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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
daleeidd opened this issue Mar 1, 2021 · 4 comments
Closed

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

daleeidd opened this issue Mar 1, 2021 · 4 comments
Milestone

Comments

@daleeidd
Copy link
Contributor

daleeidd commented Mar 1, 2021

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.

@ridiculousfish ridiculousfish added this to the fish-future milestone Mar 13, 2021
@MForster
Copy link
Contributor

MForster commented Jun 4, 2022

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

@MForster
Copy link
Contributor

MForster commented Jun 4, 2022

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?

@ridiculousfish
Copy link
Member

Let's discuss in the PR #8994

@faho
Copy link
Member

faho commented Feb 17, 2024

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

@faho faho closed this as completed Feb 17, 2024
@faho faho modified the milestones: fish-future, fish 3.6.0 Feb 17, 2024
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

No branches or pull requests

4 participants