Skip to content

Measure evil-ghostel cursor moves in buffer columns - #767

Merged
dakra merged 1 commit into
mainfrom
fix/evil-cursor-column-drift
Oct 26, 2026
Merged

dakra merged 1 commit into
mainfrom
fix/evil-cursor-column-drift

Conversation

@dakra

@dakra dakra commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Fixes #763.

evil-ghostel-goto-input-position computed the horizontal arrow count as the target's buffer column minus the terminal column of the cursor. The renderer hides the blank cell a standalone oversized glyph claims with a (space :width 0) display spec, which current-column honours, so the two coordinate systems drift by one per such cell left of both ends. With a prompt icon the shell cursor landed one cell off every time i, a, 0, $ and friends drove it to point.

The start column now comes from the renderer's published cursor position, so both ends are buffer columns and the hidden cells cancel. evil-ghostel--reset-cursor-point jumps straight to that position too.

Verification:

  • New ERT test evil-ghostel-test-goto-input-position-ignores-hidden-cell fails on main (5 arrows) and passes here (4).
  • make test-evil 153/153, make -j8 all green.
  • Live GUI session under elate with a ⏵ $ prompt rendered from a fallback font: typing 1234, ESC, i, 0 gave 12034 on main and 12304 here.
  • Full evil-ghostel elate matrix (shells on bash/zsh/fish/nu, python3, boundary suites, tracking, word boundaries, read-only with and without evil) passes with only the documented xfails.

evil-ghostel-goto-input-position computed the horizontal arrow count
as the target's buffer column minus the terminal column of the cursor.
The renderer hides the blank cell a standalone oversized glyph claims
with a zero-width space display spec, which current-column honours, so
the two coordinate systems drift by one per such cell to the left of
both ends.  With a prompt icon the shell cursor then landed one cell
off every time i, a, 0, $ and friends drove it to point.

Take the start column from the renderer's published cursor position
instead, so both ends are buffer columns and the hidden cells cancel.
evil-ghostel--reset-cursor-point jumps straight to that position too.

Closes #763.
@dakra
dakra merged commit c0c34d7 into main Oct 26, 2026
33 checks passed
@dakra
dakra deleted the fix/evil-cursor-column-drift branch October 26, 2026 18:01

This branch was previously deployed

1 inactive deployment
github-pages — c0c34d74 Deployed Oct 26, 2026 by dakra via deploy #233
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.

ghostel--cursor-pos drifts from (current-column) with 0-width glyphs in prompt

1 participant