gdh1995 / vimium-c

A keyboard shortcut browser extension for keyboard-based navigation and tab operations with an advanced omnibar
https://chrome.google.com/webstore/detail/vimium-c/hfjbmagddngcpeloejdejnfgbamkjaeg
Other
3.34k stars 254 forks source link

moving caret will only select text after making a selection in visual mode #1160

Open LaptopDev opened 3 months ago

LaptopDev commented 3 months ago

Describe the bug cannot move caret without creating selection in visual mode. Seems that it will not de-select text in visual mode or does not re-set itself in some way as to fully escape selection, even after exiting visual mode and re-entering visual mode

moving caret will only select text after making a selection in visual mode

To Reproduce

  1. in visual mode, press v to select text
  2. select text
  3. exit visual mode
  4. clear selection by pressing escape
  5. re-enter visual mode
  6. move caret

    moving caret creates text selection trail< <

Browser, OS and Vimium C versions

gdh1995 commented 3 months ago

you may try "caret mode", which can be entered by pressing c if you have been in visual mode.

map xxx enterInsertMode mode="caret" may also help.

LaptopDev commented 3 months ago

yes, I return to normal vi motions by pressing c in visual mode with an active selection to stop selection and move caret

glad there is currently a work around, thank you.

gdh1995 commented 2 months ago

Sorry I can not get what you want yet.

The caret mode is a feature, but not a working around. And a selection with a width of at least one character is necessary for users to know where a current caret is easily.

LaptopDev commented 2 months ago

Forgive me. I am only using the extension and unfamiliar with the code.

What file contains the logic for selections? I don't understand why or how selection width could be causing the behavior.

gdh1995 commented 2 months ago

Sorry again. In fact I'm not good at the text editor software VIM, so I didn't get the meaning of moving caret creates text selection trail< < in the issue description yet.

Could you give some more explanations with simple words suitable for non-programmer browser users? Maybe some snapshots add red circles on them could help.