4

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.

4

3 に答える 3

2

これは、他の Eclipse エディターでも発生するようです (PHP の PDTなど) 。

に関連している可能性がありますScrolledFormTextが、Plugin Spyは、本質的に であるWorkbenchWindowだけでなく、クラスも関係していることを示しています。AbstractDecoratedTextEditororg.eclipse.ui.texteditor.AbstractTextEditor

そのソースは、次のことをAbstractTextEditor示しています。

  • 垂直スクロール用のScrollLinesAction
  • カーソルを設定し、場合によっては水平スクロールをトリガーするためのTextNavigationAction

その動作を変更する方法がわかりませんが、アクティブなエディター識別子 (たとえば、Java の場合は " org.eclipse.jdt.ui.ClassFileEditor") に何らかの形で貢献し、それを変更する必要がありActionます。

于 2009-02-27T11:58:25.467 に答える
1

私は同じ問題を抱えていて、Eclipse Bugs でこれらの未解決のバグを見つけました。

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

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

コードの折りたたみをオフにしてファイルをリロードすると、この問題が発生するのを防ぐことができます。

グッツ、

T

于 2011-08-12T00:40:46.547 に答える
0

Eclipse のショートカットを右クリックし、プロパティを選択します。互換性タブで「windows xp(servicepack 3)」を選択します。http://www.vistax64.com/vista-general/133849-disable-dynamic-horizo ​​ntal-scrolling-vista.html

于 2013-11-26T01:08:55.187 に答える