Skip to content

fix(jump): correct jump to the end of an empty field#76

Merged
hat0uma merged 1 commit intohat0uma:mainfrom
helcoume:main
Sep 15, 2025
Merged

fix(jump): correct jump to the end of an empty field#76
hat0uma merged 1 commit intohat0uma:mainfrom
helcoume:main

Conversation

@helcoume
Copy link
Copy Markdown
Contributor

Previously, jumping to the end of a field used field.end_col - 1 as the column anchor.
This works for non-empty fields, but for empty fields (which contain only the delimiter), subtracting 1 moves the cursor to the delimiter of the previous field.
As a result, functions like next_field_end could not advance past an empty field.

This update sets the column anchor to the delimiter position itself when the destination field is empty, ensuring correct cursor movement.

Prevent the cursor from getting stuck on the current field when jumping
to the end of an empty field.
@hat0uma hat0uma merged commit bbab4c2 into hat0uma:main Sep 15, 2025
5 checks passed
@hat0uma
Copy link
Copy Markdown
Owner

hat0uma commented Sep 15, 2025

Many thanks!!

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

Successfully merging this pull request may close these issues.

2 participants