Vim: Double-click on word misses last character

Created on 27 Apr 2017  路  14Comments  路  Source: VSCodeVim/Vim

  • 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.


What did you do?

Double clicked one word

What did you expect to happen?

The full word to be selected

What happened instead?

last character in words was not selected

Technical details:

  • VSCode Version: 1.11.2
  • VsCodeVim Version: 0.6.16
  • OS: Win10
areselection kinbug

Most helpful comment

@Chillee my mistake, it's not fixed. 馃槱

All 14 comments

This should be fixed in the newest version, VSCodeVim version 0.6.20

PR #1542 should have fixed this issue.

Hmm, for some reason VSC was not proposing updates. Restarting it showed them again. I have now 0.6.20 but the issue remains. Last character is still not picked.

Oh, when you say "last character was not selected", do you mean that it looks like the last character is not selected?

If you actually copy it, does it get the whole thing?

It looks like it's not selected and ... ah I see the bug is actually in Ctrl+F. If you double-click to highlight and next do a Ctrl+F the last character is not copied into the search box.

Yeah the way we are currently handling selections is not ideal. There's an off by one error between what's actually selected (according to vscode), and we have selected (for the purposes of visual mode, etc.)

The reproduction case that gets me is:

  1. double click on a word to select it
  2. hit cmd-c to copy it
  3. hit cmd-v to paste it

It should replace the word with itself since it is still selected, but instead it replaces all but the last letter. This also happens if you then double click on another word to try and replace it with the text in your copy buffer. This does not happen if you have the plugin disabled. I'm running 0.6.20.

@dreel I think rebornix is working on the problem. Somebody else brought up the exact problem you brought up in #1455 actually.

Awesome, thanks!

it's still not fixed in v0.7.1.

@qws1986 He's not talking about with copy paste. He's talking about how it generally "looks" like it's not selected, and also that ctrl+f doesn't get the whole word.

@Chillee my mistake, it's not fixed. 馃槱

ye,it's not fixed in v0.7.1

v0.8.4

vscodevim

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jaredly picture jaredly  路  3Comments

triztian picture triztian  路  3Comments

typeoneerror picture typeoneerror  路  3Comments

orn688 picture orn688  路  3Comments

ghost picture ghost  路  3Comments