fish-shell
fish-shell copied to clipboard
Selection includes character under cursor for normal mode (non vi)
I am using fish in emacs mode (non vi mode). And the selection is off by one.

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.
How about making this dependent on the mode, or alternatively on the value of $fish_cursor_default etc?
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?
Let's discuss in the PR #8994
Closing because it appears to have been solved by #8994.