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

Multiple cursor behaves weird #1367

Closed
adsick opened this issue Dec 25, 2021 · 6 comments
Closed

Multiple cursor behaves weird #1367

adsick opened this issue Dec 25, 2021 · 6 comments
Labels
A-core Area: Helix core improvements C-bug Category: This is a bug

Comments

@adsick
Copy link

adsick commented Dec 25, 2021

This feature is described in the tutor as follows:

 Type C to duplicate the cursor to the next line.

and what I see is not quite what is written there. Idk, it is more simple to recommend you to play with it and see that it's strange but just to be more clear I will show what seems wrong to me:

reproducing

step one, put a cursor on empty line (348 in this case)
image
press C
image
see the another cursor on line 350 and not on 349 as I would expect
press again and it will skip a line again:
image

also I see there is some very non-intuitive behavior depending on does the cursor sit on end of the line or not:
put a cursor on line 359, tap C 3 times and everything works as expected
image

if we do a gl to move to last char we can get this:
image
Helix skips two lines and puts a cursor where it can be placed

but if we go beyond last character like this:
image
and start C multiplying cursors, that's whole another deal:
image
what on Earth is that?

Just my opinion but I can't see how I can make use of multiple cursors just yet, especially in it's current state.
another thing that bothers me is that when you move leftward on the column 1 the cursor moves to the end of the previous line instead of just blocking in place (pls tell me if this behavior has its own name) and when you use multiple cursors and move that way this becomes a mess. Kinda beautiful but useless.

@adsick adsick added the C-bug Category: This is a bug label Dec 25, 2021
@archseer
Copy link
Member

Helix skips two lines and puts a cursor where it can be placed

Yeah so this is the expected behavior, it'll skip lines until it can position on the same visual offset. The other two behaviors (on an empty line and past the line end) seem like bugs, I'll need to do some testing.

@kirawi kirawi added the A-core Area: Helix core improvements label Dec 25, 2021
@sudormrfbin
Copy link
Member

when you move leftward on the column 1 the cursor moves to the end of the previous line instead of just blocking in place

This is also expected behavior, but quite a few people seem to prefer it to stop at line bounds instead of going to next/previous line. It's currently also not configurable.

@adsick
Copy link
Author

adsick commented Dec 25, 2021

@sudormrfbin I've been writing my text editor (don't mind) and there I had two types of moving left and right - one was blocking and the other was not.

@kirawi
Copy link
Member

kirawi commented Dec 25, 2021

#768?

@glyh
Copy link

glyh commented Dec 31, 2021

Also, when selecting empty lines, the following lines will be selected:

asciicast

@N4tus
Copy link

N4tus commented Mar 30, 2022

Here is another example of C not being intuitive. If a cursor is placed on a line break it behaves different that just on a normal character.
helix_C_bug1
helix_C_bug2

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

No branches or pull requests

6 participants