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

Commands cc and S do not respect indent level if executed before the first character #2497

Closed
dotfrag opened this issue Mar 31, 2018 · 0 comments · Fixed by #2729
Closed

Comments

@dotfrag
Copy link

dotfrag commented Mar 31, 2018

Is this a BUG REPORT or FEATURE REQUEST? (choose one):
Bug report

What happened:
When you press cc or S to change a line, AND the cursor is anywhere before text, the cursor is not moved to the correct indentation space.

What did you expect to happen:
The cursor should move to the position right after the indentation.

How to reproduce it (as minimally and precisely as possible):
Type this line:
<tab>abcd
Move cursor to position a, b, c or d. Press cc/S. Cursor is moved to the position of (now deleted) 'a' character. This is correct.

Using the same line, move cursor to positions 1, 2, 3 or 4 (assuming the tab is 4 spaces) and press cc/S. The cursor stays on that position. This is incorrect. Expected behaviour would be to place the cursor at the 5th position, right after the tab/space indent.

Environment:

  • Extension (VsCodeVim) version: 0.11.3
  • VSCode version: 1.21.1
  • OS version: Windows 10 x64
dqsully added a commit to dqsully/Vim that referenced this issue Jun 13, 2018
Many VSCodeVim commands already respect VS Code's build-in indentation, so I thought it should stay that way
`cc` and `S` now act like when vim's filetype indent is turned on
dqsully added a commit to dqsully/Vim that referenced this issue Jun 13, 2018
Add a test for VSCodeVim#2497
Change test for VSCodeVim#1285 when autoindent is enabled
xconverge added a commit that referenced this issue Jun 14, 2018
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 a pull request may close this issue.

1 participant