Skip to content
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

Does not revert indentation correctly #101

Open
eproxus opened this issue Feb 5, 2016 · 12 comments
Open

Does not revert indentation correctly #101

eproxus opened this issue Feb 5, 2016 · 12 comments

Comments

@eproxus
Copy link

eproxus commented Feb 5, 2016

I have a file with mixed tabs and spaces for indentation. When trying to revert the modified part, Modific restores the original line and the original indentation width, but not the actual indentation itself (tabs are replaced with spaces). This makes the part show up as modified anyway, and trying to revert it does nothing.

I have the following setting enabled in Sublime Text:

"translate_tabs_to_spaces": true,

But I would expect Modific to restore the original content no matter what.

I'm using Sublime Text 3 Dev Channel, Build 3100 and Modific 2015.12.05.20.31.07 installed via Package Control.

@gornostal
Copy link
Owner

Could you provide steps to reproduce?
I don't see this issue.

@eproxus
Copy link
Author

eproxus commented Feb 5, 2016

The attached file contains a Zip archive of a Git repository with a single file file. It is modified on the last line, containing mixed tabs and spaces in the checked in version. For me, when I revert the part with Modific it sets the whole line indentation to spaces and marks the part as still modified.

test.zip

@gornostal
Copy link
Owner

I did an investigation. Turns out Modific gives a correct string to replace but ST3 replaces tab with spaces and inserts a different string.
I'll keep this issue open, but I doubt there is anything I can do to fix it.

@eproxus
Copy link
Author

eproxus commented Feb 10, 2016

Maybe there's a more low level API to use?

If not, I suggest we open a bug report / feature request on Sublime Text instead. Do you know if that is possible?

@gornostal
Copy link
Owner

Maybe there's a more low level API to use?

None that I know of.

ST bug tracker is here https://sublimetext.userecho.com/
Could you report the issue there please?

The issue is that 'edit_view' command doesn't insert mixed tabs and spaces, but converts indentation to default for the current file.

@eproxus
Copy link
Author

eproxus commented Feb 10, 2016

@gornostal
Copy link
Owner

URL redirects to "Page Not Found".

@eproxus
Copy link
Author

eproxus commented Feb 10, 2016

@gornostal
Copy link
Owner

Nope.
Are you sure it's visible to everyone? Maybe there is a visibility setting or something?

@eproxus
Copy link
Author

eproxus commented Feb 10, 2016

It's set to public, but it also says "Awaiting Moderation" so I guess it will be a while before it shows up. 😄

@gornostal
Copy link
Owner

Ah.. OK.

@eproxus
Copy link
Author

eproxus commented Feb 10, 2016

UserEcho seems mostly dead and full of spam. I cross posted to the forums as well: https://forum.sublimetext.com/t/edit-view-changes-indentation-of-inserted-text/17389

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants