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

Pasting after deleting a line leaves cursor in wrong position #1218

Closed
dreadwail opened this issue Jan 10, 2017 · 16 comments
Closed

Pasting after deleting a line leaves cursor in wrong position #1218

dreadwail opened this issue Jan 10, 2017 · 16 comments
Labels

Comments

@dreadwail
Copy link

dreadwail commented Jan 10, 2017

Please thumbs-up 👍 this issue if it personally affects you! You can do this by clicking on the emoji-face on the top right of this post. Issues with more thumbs-up will be prioritized.


What did you do?

dd shift-p escape

What did you expect to happen?

After pasting the line and hitting escape it should leave the cursor on the line that was pasted.

What happened instead?

The cursor is placed on the line underneath.

Technical details:

  • VSCode Version: 1.8.1
  • VsCodeVim Version: 0.4.10
  • OS: OS X 10.11.6
@dreadwail
Copy link
Author

The issue is present in a number of variations. The common theme is pasting something with a newline at the end. After hitting escape it should leave the cursor on the pasted line.

@johnfn
Copy link
Member

johnfn commented Jan 10, 2017

Does esc have anything to do with it? P doesn't put you in insert mode.

Can you show me the text you're operating on that reproduces this?

@dreadwail
Copy link
Author

Correct, P doesn't put you in insert mode. ESC should also have no effect on modes at this point. But if you do hit ESC, it moves your cursor down, which is unexpected.

@johnfn
Copy link
Member

johnfn commented Jan 10, 2017

Can you give me an example of some text that you ran ddP<esc> to see this behavior?

Do you have anything weird in your user settings? :P

@dreadwail
Copy link
Author

Nah this is a fresh install of vscode with the extension. Here is some sample text:

1. foo
2. foo
3. bar
4. foo
5. foo

Placing the cursor on line 3 bar and then hitting d d P ESC results in your cursor being left on the 4th line foo instead of the bar that was pasted.

@johnfn
Copy link
Member

johnfn commented Jan 10, 2017

How weird; I can't reproduce that.

Could you do me a favor and download the latest Insiders build of Code and see if the bug still reproduces there?

@dreadwail
Copy link
Author

Sure. Will report back with my findings.

@dreadwail
Copy link
Author

Interesting! That does indeed fix it.

@dreadwail
Copy link
Author

Ok I identified the issue and it isn't the Insiders build that fixed the issue, it is this setting:

"vim.useSolidBlockCursor": true

With it true, the issue is present. With it false the issue is not present.

@johnfn
Copy link
Member

johnfn commented Jan 10, 2017

Wow, super weird! Thanks for the report.

@johnfn
Copy link
Member

johnfn commented Jan 10, 2017

Huh, solid block cursor actually cause a LOT of bugs. Definitely worth investigating further. Also very strange.

@leetheguy
Copy link

Holy cow! I just want to say that is a really annoying and obscure bug.
Other than that, great product though!

@xconverge
Copy link
Member

I bet #1247 is related and #1279

@jpoon
Copy link
Member

jpoon commented May 19, 2017

I believe this is fixed by #1402. Please re-open if that's not the case. cc @Chillee

@jpoon jpoon closed this as completed May 19, 2017
@dreadwail
Copy link
Author

Sorry for the late response here, but I can confirm this is indeed fixed @jpoon @xconverge . Thanks!

@Chillee
Copy link
Member

Chillee commented Jun 22, 2017

@benlakey We've actually just removed vim.useSolidBlockCursor. It had very miniscule gains (the only thing was that it allowed to you have a blinking cursor in insert mode and a solid cursor in normal mode), and it slows down the extension a ton.

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

No branches or pull requests

6 participants