fish-shell icon indicating copy to clipboard operation
fish-shell copied to clipboard

Selection includes character under cursor for normal mode (non vi)

Open magenta404 opened this issue 4 years ago • 3 comments

I am using fish in emacs mode (non vi mode). And the selection is off by one.

0000

The above screenshot shows me selecting two characters "he", but also erroneously includes the following "l" character.

Version: 3.1.2 OS: MacOS 11.2.1 Terminal: xterm-256color

I fixed (or caused?) this issue in #3684, but it looks like it regressed with #6329. The real issue appears to be that emacs and vi are handled the same which has led to a back and forth on whether selection should be inclusive or exclusive of the cursor character.

magenta404 avatar Mar 01 '21 21:03 magenta404

How about making this dependent on the mode, or alternatively on the value of $fish_cursor_default etc?

MForster avatar Jun 04 '22 11:06 MForster

I'm proposing a change in #8994 that sets the selection according to the currently configured cursor shape, if any. This seems to me to be the most principled way of addressing the different preferences of users with block cursors vs. line cursors.

What do you think?

MForster avatar Jun 04 '22 17:06 MForster

Let's discuss in the PR #8994

ridiculousfish avatar Jun 05 '22 05:06 ridiculousfish

Closing because it appears to have been solved by #8994.

faho avatar Feb 17 '24 21:02 faho