fix: let no-op cursor moves fall through - #1208
Merged
Merged
Conversation
okuuva
force-pushed
the
push-lvopwtlqrxup
branch
from
September 10, 2026 12:15
7a4740e to
6a05c58
Compare
Cursor movement commands always reported Applied, even when they left the cursor and selection unchanged. That stopped UntilFound before a fallback event could run. Compare the complete cursor state before and after every MoveCursor command. Report Inapplicable only when neither position nor selection changes, so blocked moves fall through while selection collapse remains Applied. Preserve redo and history traversal after no-op moves. Propagate edit status through Left and Right events so their fallbacks can run too. Keep eligible quick-menu dismissal handled even when the cursor stays put, without consuming other inapplicable moves. Cover vertical, horizontal, and line-edge movements at boundaries, plus a missing-target selection motion. Add regression coverage for the Left/Right aliases, redo, history traversal, and menu dismissal. Addresses the cursor-movement portion of nushell#876. See also: atuinsh/atuin#798
okuuva
force-pushed
the
push-lvopwtlqrxup
branch
from
September 10, 2026 21:24
6a05c58 to
05193a6
Compare
okuuva
added a commit
to okuuva/atuin
that referenced
this pull request
Sep 14, 2026
On Nushell 0.115.2 and newer, try `movelineup` after `menuup` and before opening Atuin. Keep the existing chain on older versions, where blocked cursor movement prevents fallback. Requires the [no-op cursor movement fallback fix in Reedline][1]. Nushell picked it up in [nushell/nushell#19013][2]. Related: atuinsh#798 [1]: nushell/reedline#1208 [2]: nushell/nushell#19013
2 tasks
23 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Make cursor movement commands report whether they changed the cursor or selection, allowing
UntilFoundto continue to a fallback event after a blocked move. This enables navigating multiline prompts while still allowingatuinto trigger command-history search when pressingUpon the topmost line.This changes observable
UntilFoundbehavior but does not change Reedline's public API.Before
Cursor movement commands always reported
Applied, even when they left the cursor and selection unchanged. A blocked movement therefore stoppedUntilFoundbefore its fallback event could run.After
Cursor movement commands compare the complete cursor state before and after execution. They report
Inapplicablewhen neither the position nor selection changes, allowingUntilFoundto try its next event. Movements that change the cursor or collapse a selection still reportApplied.No-op moves preserve redo and history traversal. The
LeftandRightevents propagate edit status so their fallbacks can run too. Eligible quick-menu dismissal remains handled even when the cursor stays put, without consuming other inapplicable moves.Tests cover vertical, horizontal, and line-edge movements at boundaries, plus a missing-target selection motion. Regression coverage also checks the
Left/Rightaliases, redo, history traversal, and menu dismissal.Additional notes
Addresses the cursor-movement portion of #876.
Related Atuin issue: atuinsh/atuin#798.