helix
helix copied to clipboard
Go to line <n> doesn't work as expected
I believe, based on the g menu, that g11 should go to line 11 in a file. However, this doesn't work currently. Typing :11 does go to line 11, so the functionality seems to be present, but not implemented for the g11 case

https://user-images.githubusercontent.com/70898/162788441-4955bff9-d468-423e-ba6e-221dcff59834.mp4
.
g11⏎ doesn't jump to l11 but g11g or 11gg will. The menu text is a bit confusing because it suggests you hit g to goto line but that's actually the second g (the first opens the goto menu). You can also use 11G or as you say :11⏎ works too
Ah, I understand. Here's an attempt to clarify what's happening.
The menu text is a bit confusing <- I agree ;)
@the-mikedavis Could this be reopened? It is more than confusing, it is plain wrong. Something as basic as going to a line should not have false information presenting itself to you!
gg(line number) is broken, it goes to the start, and then only when you make a down movement it goes to the intended line.
g(line number)g is OK, this should be obvious in the popup hint wording and be in the docs.
Can g(line number)(enter) be made to work as well/instead?
It is more than confusing, it is plain wrong.
To rehash my comment above, I see this as potentially confusing since it may not be clear that <n> is the count and it's easy to miss that g is a separate keypress since you just hit g to enter this menu. I think it's a stretch to call the docs false information 😕
gg(line number)is broken...g(line number)gis OK, this should be obvious in the popup hint wording and be in the docs.
A PR would be welcome to make this clearer. Aside from changing <n> to be <count>, I genuinely don't know how to improve this without making it a big paragraph that won't fit in the auto-info box. I'll re-open this issue for that.
Can
g(line number)(enter)be made to work as well/instead?
Probably but there are already four ways of going to a line number: g<n>g, <n>gg, <n>G, :<n>⏎. I would rather eliminate the gg ones than add a new way. Plus, I can't think of any other key sequence that needs <ret> to finish the sequence - that behavior usually belongs to the prompt, as with :<n>⏎.
@the-mikedavis Maybe false information was too strong, it just seems to say something to me that is not true, but others might understand it in a different way.
I will try and think more about this issue...
Bumped here as I was confused as well.