-
Notifications
You must be signed in to change notification settings - Fork 0
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
[CLOSED] When autoindenting, only insert a tab if the cursor doesn't move due to CodeMirror's indentation #5326
Comments
Comment by njx
|
Comment by njx Also, note that there's one bit of behavior that isn't changed here: if the cursor is right at the beginning of the text in a line, and it's not already at the right indentation, it just inserts a tab instead of pushing to the correct indentation. This is because it's not easy for us to distinguish between that case and the case where it's already at the right indentation (in which case you do just want to tab over)--we would need to know how much CM expects the line to be indented. I think that's fine for now since we've still improved the behavior overall. |
Comment by redmunds Looks good. Merging. Is this also for adobe/brackets#5633 ? |
Comment by njx No, that issue is the one I mentioned in my last comment above that isn't addressed by this pull. |
Comment by redmunds
|
Issue by njx
Friday Nov 01, 2013 at 20:43 GMT
Originally opened as adobe/brackets#5815
For #5068. This should get rid of the most common case where you can accidentally get extra whitespace at the end of a line.
Note that there's one minor issue remaining with this behavior: if a line is already at the right indent level, you click in the whitespace at the beginning, and you hit TAB, the indentation doesn't change and the cursor moves to the beginning of the text (which is correct), but the file gets marked dirty. I have a comment out to Marijn on this. I don't think it's a showstopper.
njx included the following code: https://github.com/adobe/brackets/pull/5815/commits
The text was updated successfully, but these errors were encountered: