sindresorhus / editorconfig-sublime

Sublime Text plugin for EditorConfig - Helps developers maintain consistent coding styles between different editors
MIT License
1.77k stars 108 forks source link

Scroll position moves on save #27

Closed Rowno closed 10 years ago

Rowno commented 10 years ago

A recent update added a bug that causes the editor to scroll up 1 line every time the editor is saved. I think 2e68c0ca036e29e148771518ee00c3288b251799 is causing it because I'm pretty sure this wasn't happening last week.

I'm using Sublime Text 3 on Mac OSX 10.9 / Ubuntu 13.10.

ghost commented 10 years ago

Can confirm I'm getting this too, here's a licecap gif showing the behaviour:

editorconfig-scroll-save

I'm using Sublime Text 3 on Mac OSX 10.9.2

dpashkevich commented 10 years ago

For me it's even worse, the scroll position gets reset to the beginning of the file every time I hit save. Using ST2 under Ubuntu 12.04

StefanoRausch commented 10 years ago

ST 2 on Mac does scroll 1 line for me.

karlschwaier commented 10 years ago

I have the same issue with ST2 on Ubuntu 13.10. It scrolls exactly one line up after saving.

dpashkevich commented 10 years ago

Interestingly, I have one line up scrolling on a 13.10 machine with ST2 (same configuration) as others report, but on 12.04 it's different (reported above)

joshfry commented 10 years ago

I'm having the same issue using ST2 and ST3 on Mac OS 10.9.2. Depending on font size, on save, it will either scroll up one line until it reaches the top or will jitter on one line.

lancedikson commented 10 years ago

I have the same issue with ST2 on Windows 7

philippotto commented 10 years ago

I'm experiencing the same issue with ST3 on Windows 8.

daniel-wer commented 10 years ago

Same issue for me with ST2 on Ubuntu 12.04, scrolls one line for some files and up to the top for some others.

sindresorhus commented 10 years ago

I've worked around it, but it's really a bug in Sublime.

dpashkevich commented 10 years ago

Thanks!

So ST's implementation of translate_tabs_to_spaces is buggy, but I don't see any scroll jumping when I manually invoke the default commands Indentation: Convert to Tabs/Spaces. Is there something else happening?

sindresorhus commented 10 years ago

@dpashkevich it's the expand_tabs command that causes it.

dpashkevich commented 10 years ago

Oh ok, thanks for clarifying! Just tried to do some additional testing.

drguiom commented 5 years ago

I know this is a really old post but I can't find an answer as to how this has been fixed.

Every time I save a file (Mac OSX 10.13.6 and Sublime Text 3.1.1) the cursor position jumps near the top of the file.

rowe-morehouse commented 4 years ago

Experiencing the same issue with JSON files after installing JSON key-value package. Sublime 3.2.2. build 3211