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

Pasting in visual mode doesn't update the default buffer's contents #1991

Closed
nikklassen opened this issue Sep 1, 2017 · 6 comments 路 Fixed by #2602
Closed

Pasting in visual mode doesn't update the default buffer's contents #1991

nikklassen opened this issue Sep 1, 2017 · 6 comments 路 Fixed by #2602

Comments

@nikklassen
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.


This a BUG REPORT:

Environment:

  • VSCode Version: 1.15.1
  • VsCodeVim Version: 0.10.0
  • OS: Mac OS X 10.12.6

What happened:

When "pasting over" a selection in visual (or visual line) mode, the text that is removed by that paste isn't put in the default buffer.

What did you expect to happen:

The removed text should now be the contents of the default buffer.

How to reproduce it:

Starting with the text

hello
world

Do

  1. dd
  2. V
  3. p
  4. P

This results in


hello
hello

In Vim the results are

world
hello

Note: there are extraneous newlines in the VSCode output, but I believe this is a separate issue.

@Chillee
Copy link
Member

Chillee commented Sep 1, 2017

@nikklassen I believe this is an issue specific to visual line mode, not visual mode, right?

@nikklassen
Copy link
Author

I observed this behaviour in both visual line and visual mode.

@Chillee
Copy link
Member

Chillee commented Sep 1, 2017

To be more exact, this is actually an issue specific to having the text being pasted be linewise.

For example, with |foo bar, veywvepp results in foo foobar

@nikklassen
Copy link
Author

nikklassen commented Sep 1, 2017

Sorry, yes. That is correct. The expected behaviour is observed if the text was yanked using a visual selection or a motion like ye. This issue only occurs with linewise operations or yanks done from visual line mode.

@innerdaze
Copy link

innerdaze commented Mar 6, 2018

I'm seeing the same result in vim as we're getting in VSCode. I get this in both:

hello
hello

I'm seeing the expected behaviour for this ticket when doing something like ywvwp. I'm confused because I came on here to report that as a bug as it behaves different to vim and then I see this issue which is saying the opposite is the correct behaviour.

@Chillee
Copy link
Member

Chillee commented Mar 7, 2018

@innerdaze I can't reproduce what you're saying in vim. I get the expected

world
hello

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.

3 participants