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

Always move cursor to end of indent even if whitespace didn't change #1905

Closed
wants to merge 1 commit into from
Closed

Always move cursor to end of indent even if whitespace didn't change #1905

wants to merge 1 commit into from

Conversation

njx
Copy link

@njx njx commented Oct 22, 2013

Currently, if you indent a line, the cursor is inside the whitespace at the beginning of the line, and CodeMirror determines that the whitespace needs to change, the cursor moves to the end of the indenting whitespace, which makes sense. However, if no change to the whitespace is needed, the cursor stays at its current location, which leads to inconsistent behavior. It would make sense to always move the cursor to the end of the indenting whitespace so the user is ready to type, even if there happens to already be the right amount of whitespace on the line. This proposed patch fixes that.

@marijnh
Copy link
Member

marijnh commented Oct 23, 2013

Agreed. Merged as 32d7db0

@marijnh marijnh closed this Oct 23, 2013
@njx
Copy link
Author

njx commented Oct 23, 2013

Thanks!

@njx njx deleted the indent-move-cursor branch October 23, 2013 17:53
@marijnh
Copy link
Member

marijnh commented Oct 26, 2013

Note fallout in issue #1910 and followup change in 759b3a0

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

Successfully merging this pull request may close these issues.

2 participants