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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect cursor position after vi{ #2063

Closed
dcervenkov opened this issue Oct 11, 2017 · 2 comments
Closed

Incorrect cursor position after vi{ #2063

dcervenkov opened this issue Oct 11, 2017 · 2 comments

Comments

@dcervenkov
Copy link

  • Click thumbs-up 馃憤 on this issue if you want it!
  • Click confused 馃槙 on this issue if not having it makes VSCodeVim unusable.

The VSCodeVim team prioritizes issues based on reaction count.


BUG REPORT:

Environment:

  • VSCode Version: 1.17.0
  • VsCodeVim Version: 0.10.1
  • OS: Linux 4.13

What happened:

Consider a code snippet such as

void func() {
    int foo;
    int bar;
}

when one places the cursor inside the {} and presses vi{ part of the code is selected and the cursor is moved to the } line.

What did you expect to happen:

Cursor should be moved to the int bar; line - that's what vim does.

@Chillee
Copy link
Member

Chillee commented Oct 12, 2017

@dcervenkov This is more of a visual bug than anything else. Unlike vim, VSCode does not have any semblance of being able to place your cursor on the newline. So, we need to put the cursor on the line after the selection.

You'll see that if you press h, the cursor is still on the correct line.

@dcervenkov
Copy link
Author

@Chillee Good point about the cursor on the newline. However, I don't think it's just a visual bug - if the whole block is indented to start with, pressing h after vi{ does nothing. Secondly, trying to indent the inner part using >> indents the } line as well.

Strafos added a commit to Strafos/Vim that referenced this issue Oct 18, 2017
Strafos added a commit to Strafos/Vim that referenced this issue Oct 20, 2017
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

No branches or pull requests

2 participants