14

Some of my Javascript lines of code are longer than the editor window view. I have recently upgraded to the Helios version of Eclipse and noticed that after editing one of these long lines (I am scrolled to the right), after a few seconds the editor window will automatically scroll back to the left to the beginning of the line. It breaks my concentration and it's so annoying!

Does anyone know how to stop this behavior? I've searched around and haven't been able to find anything other than others being annoyed by this same issue!

I am not willing to turn on word wrap and wrap my lines :).

icats
  • 959
  • 3
  • 13
  • 24
  • It seems like there isn't any way for the user to turn this off - the editor developer must do it. http://stackoverflow.com/questions/594129/disable-automatic-horizontal-scrolling-in-eclipse – no.good.at.coding Mar 18 '11 at 15:27

4 Answers4

19

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

No sign there of having a fix for it, but you can prevent it from happening when you switch the Code Folding off and reload the file.

agf
  • 171,228
  • 44
  • 289
  • 238
Tom
  • 539
  • 4
  • 7
  • Thanks! Additionally, you can prevent it from happening if you hit the 'Toggle Mark Occurrences' button in the toolbar (or Alt+Shift+O) so marking occurrences is OFF. (just found this one :)) – icats Nov 30 '11 at 20:25
  • Ah! Never mind my above comment. It seems that it still does it. – icats Nov 30 '11 at 20:29
  • Confirming this solution works (and that the bug is super annoying). – jbowman Mar 19 '15 at 19:13
  • 2
    FYI, to navigate to switch off Code Folding: `Window > Preferences > PHP > Editor > Code Folding` – achasinh Jul 17 '15 at 06:51
  • I had this issue only with Eclipse Indigo an JavaScript, same sollution as @achasinh said but going to JavaScript instead of PHP, thanks! – Goty Metal Dec 20 '16 at 10:17
3

For java in eclipse :

Windows -> Preferences -> Java ->Editors ->Folding -> Enable Folding (uncheck)

For HTML, JSP, XML etc in eclispe : Windows -> Preferences -> General -> Editors -> Structured Text Editors -> Enable Folding (uncheck)

0

If you're using Mac OSX, press OPTION + COMMAND + O to turn off "Toggle Mark Occurrences" - it looks like a highlighter in the toolbar.

Sterling Bourne
  • 3,064
  • 23
  • 22
0

I turned off Toggle Breadcrumb, and it fixed my problem.