-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repositions cursor at bottom of file on untabify #41
Comments
I'll take a look at this later today. |
Sorry it has taken me so long to get back to this. I can't reproduce this using Atom v1.4.1 on Mac OS X 10.11.3 with the latest version of tabs-to-spaces. Could you give the following information?
|
@lee-dohm I recently updated to Atom v1.4.1 on OSX 10.11.3. Prior to the update, it was happening on all files. Unfortunately, before updating to Atom v1.4.1, I also tweaked some of my settings which resulted in Atom not inserting tabs instead of spaces so I can't reproduce the problem. |
I'm glad it is working for you now. I'll see if I can find the time to poke around and reproduce the problem. Thanks for reporting it! |
@lee-dohm I figured out how to reproduce this. If you use atom beautify on a fle, it changes spaces to tabs but leaves the cursor where it was before running it. Then when untabify is run on the file, it changes the tabs to spaces and the cursor is reposition ed at the end of the file. |
I think you're going to need to be a little more specific. I installed atom-beautify and ran it on a random JS file and couldn't replicate what you're describing using Atom v1.6.0-dev-52c9067 on Mac OS X 10.11.3. Could you give the following information?
|
I was able to reproduce this with both atom-beautify set to use tabs with JS and simply using tabify and then untabify on Atom v1.4.1 on Mac OS X 10.11.3. I'll work on it this week. |
Sorry this has gone so long without updates. I tracked down the regression to 4de9105. The performance optimization I added to resolve #16 prevents accurately retaining cursor positions. Because it replaces all text in the file whenever anything is changed, all cursors are pushed to the end. In a tradeoff between correctness and performance, my personal opinion is to err on the side of correctness. I'll be reverting the performance optimization ... but hoping that I can retain it as an option in a future version in case people don't care where their cursors end up so long as it is fast 😀 |
Fixed in da929bf |
Every time I untabify, the cursor is repositioned at the bottom of the file. Is there a way configure the package to leave the cursor at its current position?
The text was updated successfully, but these errors were encountered: