glennr / uber-glory-tmbundle

Uber Textmate macros to make your life glorious. Well they mostly strip whitespace.
161 stars 10 forks source link

Cursor position changes after save #7

Open aseemk opened 13 years ago

aseemk commented 13 years ago

I type a few things with some trailing whitespace, press cmd+S, and the bundle works great in removing that whitespace -- thanks! -- but unfortunately, my cursor changes positions. It appears to go back the number of whitespace characters that were deleted above it. If you ever used Windows XP or older, this is reminiscent of the same annoying behavior in Notepad when word wrap was on. ;)

Do you think it's possible to fix this? Thanks for the great work in the bundle so far!

glennr commented 13 years ago

Hi - could you post a screenshot or sample file/lines showing the behaviour (Im not sure how to reproduce it)

aseemk commented 12 years ago

Sorry I never got back on this!

This is easy to repro: open an existing file, add a bunch of trailing whitespace somewhere, place your cursor anywhere later in the file, and save — your cursor will move (but interestingly, not exactly by the number of trailing whitespace characters you added).

Any idea if this is even fixable? If it is, that'd be great — I and friends routinely notice this.