#288 ✓resolved
tim.felgentreff (at student.hpi.uni-potsdam)

Strip trailing spaces jumps to top

Reported by tim.felgentreff (at student.hpi.uni-potsdam) | August 20th, 2010 @ 09:23 AM

9 out of 10 times the strip trailing spaces plugin will jump to the top of the document (observed on dbd9872). This is especially confusing since the line numbers stay put. In the attached screenshot you see the top of a file before and save, and after I scrolled down to line 84 and saved.

Comments and changes to this ticket

  • Steven Hancock

    Steven Hancock August 20th, 2010 @ 10:07 AM

    I'm running dbd9872 now and just tried it several times with a few different files, I can't reproduce this on Ubuntu Karmic (9.10) 32-bit with Sun JVM 1.6.0_20-b02. What OS and JVM are you using? I have (very limited) access to a Windows machine I might be able to test this on some time tomorrow.

    Can you confirm that you don't have Strip Trailing Spaces installed in your ~/.redcar/plugins directory? I've noticed that can cause some strange problems. If that isn't the cause of the problem, then I'll try to reproduce this on another machine and see if I can track down what's causing it.

  • tim.felgentreff (at student.hpi.uni-potsdam)

    tim.felgentreff (at student.hpi.uni-potsdam) August 20th, 2010 @ 10:15 AM

    Mac OS X, java version "1.6.0_20". I removed the plugin from .redcar/plugins yesterday (and restarted Redcar) so that isn't the problem.

  • tim.felgentreff (at student.hpi.uni-potsdam)

    tim.felgentreff (at student.hpi.uni-potsdam) August 20th, 2010 @ 10:15 AM

    Snow Leopard, 10.6.4, if that makes any difference

  • Steven Hancock

    Steven Hancock August 20th, 2010 @ 11:07 AM

    Unfortunately I don't have access to a Mac, I'll have to see if I can get my brother's Windows machine for a little while tomorrow and try to reproduce this since it isn't happening on my Linux box.

  • tim.felgentreff (at student.hpi.uni-potsdam)

    tim.felgentreff (at student.hpi.uni-potsdam) August 20th, 2010 @ 01:08 PM

    Maybe this is important: when I save and move the mouse just a teeny bit it will jump, but jump back to the exact position where I was (even in very long files, where such a slight mouse movement would not move me back from the top). So it seems to me this could be a platform-specific bug in the SWT bindings.

  • Steven Hancock

    Steven Hancock August 21st, 2010 @ 01:34 AM

    That's a possibility. I wasn't able to test on another machine yet (been swamped with other work today, I'm in the middle of replacing an engine in a Chevy Impala), but I have an idea that might at least work around the issue.

    When I changed to line-by-line processing and noticed the jumping went away here, I took out the scrolling/cursor adjusting code I was using before because it wasn't necessary. It wouldn't have really hurt anything to leave it in, so I can try putting that back into the plugin. That won't eliminate the jumping issue, but at least when you do get the jumping it should correct itself (and if it is a platform specific SWT issue, that's probably the best I can do unless Eclipse releases a new version of SWT that fixes it).

    What really disturbs me, because I've never seen it happen even when the plugin had major jumping/jerking issues, is the way the line numbers on the left don't change.

  • Steven Hancock

    Steven Hancock August 24th, 2010 @ 07:54 AM

    Before I push any changes to the main repo, mind giving this a try and letting me know if it fixes the problem on your end?

    http://github.com/stevenh512/redcar/tree/strip_trailing_spaces_cursor

  • tim.felgentreff (at student.hpi.uni-potsdam)

    tim.felgentreff (at student.hpi.uni-potsdam) August 24th, 2010 @ 10:48 AM

    Well, it still jumps to the top and then back to where I was - just like previously (when you used document.replace). I say, leave it out, because it really shouldn't be needed and is so annoying I won't use it anyway. Might be a problem with the MateView, I'll look into that.

  • Daniel Lucraft

    Daniel Lucraft September 4th, 2010 @ 01:03 PM

    • State changed from “new” to “resolved”

    Seems to be fixed now. in 0.5 at least.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A programmer's text editor for Gnome.

People watching this ticket

Pages