可以在 Eclipse 中禁用自动水平滚动吗?

发布于 2024-07-14 05:18:51 字数 202 浏览 6 评论 0原文

有时,当我跳入源代码时,例如通过搜索或查找某些内容的声明时,Eclipse 文本编辑器会尝试通过水平滚动来显示附近的长行。 即使我跳转到的项目完全在显示屏内而不滚动,也会发生这种情况。 我觉得这很烦人,所以:

有没有办法禁用它? 我徒劳地搜索了所有编辑器设置。

具体来说,这是关于 Eclipse CDT,但我认为 JDT 中的行为是相同的。

Sometimes when I jump into source code, e.g. from search or when looking up the declaration of something, the Eclipse text editor tries to display nearby long lines by horizontal scrolling. This happens even if the item I jumped to is well within the display without scrolling. I find this rather annoying, so:

Is there a way to disable this? I have searched in vain through all the editor settings.

Specifically, this is about Eclipse CDT, but I suppose the behaviour is the same in JDT.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

天涯离梦残月幽梦 2024-07-21 05:18:51

这似乎也发生在其他 Eclipse 编辑器中(例如 PDT for PHP

它可能与 ScrolledFormText,但是 Plugin Spy 告诉我们涉及 WorkbenchWindow 类,以及 AbstractDecolatedTextEditor,本质上是一个 <代码>org.eclipse.ui.texteditor.AbstractTextEditor

AbstractTextEditor 的来源 表示具有:

  • 用于垂直滚动的 ScrollLinesAction
  • 用于设置光标并可能触发水平滚动的 TextNavigationAction

我不知道如何更改该行为,除非以某种方式做出贡献活动编辑器标识符(例如,对于 java,“org.eclipse.jdt.ui.ClassFileEditor”),并修改该 Action

This seems to happen in other eclipse editors too (like PDT for PHP)

It could have been related with the ScrolledFormText, but the Plugin Spy tells us a WorkbenchWindow class is concerned, as well as an AbstractDecoratedTextEditor, that is in essence an org.eclipse.ui.texteditor.AbstractTextEditor.

The source of that AbstractTextEditor indicates having:

  • a ScrollLinesAction for vertical scrolling
  • a TextNavigationAction for settings the cursor and potentially triggering horizontal scrolling

I am not sure how to change that behavior, except by contributing somehow to the active editor identifier (for instance, for java, "org.eclipse.jdt.ui.ClassFileEditor"), and modifying that Action.

标点 2024-07-21 05:18:51

我遇到了同样的问题,并在 Eclipse Bugs 上发现了这些未解决的错误:

https ://bugs.eclipse.org/bugs/show_bug.cgi?id=314208

https://bugs.eclipse.org/bugs/show_bug.cgi?id=321189

当您关闭代码折叠并重新加载文件时,您可以防止这种情况发生。

格茨,

T

I was having the same issue and found these open bugs for it on the Eclipse Bugs:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=314208

https://bugs.eclipse.org/bugs/show_bug.cgi?id=321189

You can prevent it from happening when you switch the Code Folding off and reload the file.

grtz,

T

£噩梦荏苒 2024-07-21 05:18:51

右键单击 Eclipse 快捷方式并选择属性。 在兼容性选项卡中选择“windows xp(servicepack 3)。http://www.vistax64.com/vista-general/133849-disable-dynamic-horizo​​ntal-scrolling-vista.html

right click on your eclipse shortcut and choose properties. in compatibility tab choose "windows xp(servicepack 3). http://www.vistax64.com/vista-general/133849-disable-dynamic-horizontal-scrolling-vista.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文