fix(input): restore arrow key navigation

Route editor and command-line arrows by active context and recall successfully dispatched commands.\n\nRefs #485
This commit is contained in:
Hakan Seven committed 2026-08-05 00:08:35 +03:00
1 parent 657d023fb7
commit 474bfcc7db
9 files changed
+330 -64

No files matched your search

+20
View File
@@ -1574,6 +1574,14 @@ pub enum DsField {
Dimtzin,
}
#[derive(Debug, Clone, Copy)]
pub enum ArrowKey {
Up,
Down,
Left,
Right,
}
#[derive(Debug, Clone)]
pub enum Message {
Tick(Instant),
@@ -1826,6 +1834,18 @@ pub enum Message {
CommandHistoryPrev,
/// Recall next command in history (↓ arrow key).
CommandHistoryNext,
/// An unconsumed arrow key; the active editor gets first choice, otherwise
/// the configurable shortcut table handles it.
ArrowKeyPressed {
direction: ArrowKey,
shortcut: String,
extend_selection: bool,
},
/// A widget captured Up/Down; resolve it only if the command input owns
/// keyboard focus.
CommandLineArrowProbe { direction: ArrowKey },
/// Result of the command-input focus query for a captured Up/Down key.
CommandLineArrowResolved { direction: ArrowKey, focused: bool },
/// Toggle the dropdown listing the full command-line history.
CommandHistoryToggle,
/// Grab/move/release the expanded history panel's top resize edge.