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

Counterintuitive behavior with the bar cursor #1977

Open
dstrelnikov opened this issue Apr 6, 2022 · 3 comments
Open

Counterintuitive behavior with the bar cursor #1977

dstrelnikov opened this issue Apr 6, 2022 · 3 comments
Assignees
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug

Comments

@dstrelnikov
Copy link

dstrelnikov commented Apr 6, 2022

Summary

I prefer the bar cursor shape, however the selection looks counterintuitive. I'm not sure this will be considered as a bug cause the cursor is supposed to select a single character in helix.
Screenshot_20220406_114258

On the screenshot 'r' does not seem to be selected despite it is. The same issue with the backward selection.

Reproduction Steps

Set

[editor.cursor-shape]
normal = "bar"

Open helix and type a word. Then switch back to the normal mode. Press b and see the first cursor-selection issue. Press e and see a similar issue.

Helix log

No response

Platform

Linux

Terminal Emulator

Konsole

Helix Version

2.05-dev (deb7ee6)

@dstrelnikov dstrelnikov added the C-bug Category: This is a bug label Apr 6, 2022
@archseer
Copy link
Member

archseer commented Apr 6, 2022

This is because the selection shifts by one space when insert mode is entered. Would need to adjust rendering in normal mode.

@pascalkuthe
Copy link
Member

This was partially fixed by #5575. The only remaining issue is that we might want to move the bar cursor to the right by one when it's the head similar to insert mode so it appears at the end of the selection instead of at the start of the last selected cursor.

@varaskkar
Copy link

The only remaining issue is that we might want to move the bar cursor to the right by one when it's the head similar to insert mode

Yes please!! This fix would be great. I use insert mode a lot and this bug is really pesky.

I have this keymap in my config:

m = ["trim_selections", "search_selection", "search_next"]

When I wanna search for the char ; I press the "m" key when the cursor is to the left of the ";" and it works. But, if I select the char ; then it actually selects ;s with s being the next character, which it shouldn't pick up.

gif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

6 participants