feat(core): Add input modes and half-page cursor movement.
Some checks failed
CI / Check (macos-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Clippy (strict) (push) Has been cancelled
CI / Format (push) Has been cancelled
CI / Test (macos-latest) (push) Has been cancelled
CI / Test (ubuntu-latest) (push) Has been cancelled

This commit is contained in:
2026-03-13 22:56:30 -04:00
parent 6a4cc85285
commit d9ed49e7d9
8 changed files with 795 additions and 54 deletions

View File

@@ -125,6 +125,34 @@ pikl_tests! {
offset: 0
}
}
nav mod half_page {
viewport: { height: 10, count: 30 };
test half_page_down_from_top {
actions: [half-page-down]
cursor: 5
offset: 0
}
test half_page_up_from_middle {
actions: [half-page-down, half-page-down, half-page-up]
cursor: 5
offset: 1
}
test half_page_down_clamps_at_bottom {
actions: [half-page-down, half-page-down, half-page-down,
half-page-down, half-page-down, half-page-down]
cursor: 29
}
test half_page_up_clamps_at_top {
actions: [half-page-down, half-page-up, half-page-up]
cursor: 0
offset: 0
}
}
}
// ---------------------------------------------------------------------------
@@ -192,4 +220,79 @@ pikl_tests! {
cancelled
}
}
menu mod pipeline_queries {
items: ["error_log", "warning_temp", "info_log", "debug_temp"];
test exact_filter {
actions: [filter "'log", confirm]
selected: "error_log"
}
test exact_then_inverse {
actions: [filter "'log | !error", confirm]
selected: "info_log"
}
test cancel_pipeline {
actions: [filter "'xyz", cancel]
cancelled
}
}
menu mod mode_switching {
items: ["alpha", "bravo"];
test set_mode_and_confirm {
actions: [set-mode-normal, set-mode-insert, filter "bra", confirm]
selected: "bravo"
}
}
menu mod regex_pipeline {
items: ["item-001", "item-abc", "item-123"];
test regex_filter_confirm {
actions: [filter "/[0-9]+/", confirm]
selected: "item-001"
}
}
menu mod inverse_fuzzy {
items: ["alpha", "bravo"];
test exclude_alpha {
actions: [filter "!alpha", confirm]
selected: "bravo"
}
}
menu mod three_stage {
items: ["error_log_123", "warning_temp_456", "info_log_789", "debug_temp_012"];
test full_pipeline {
actions: [filter "'log | !error | /[0-9]+/", confirm]
selected: "info_log_789"
}
}
menu mod half_page_menu {
items: ["a","b","c","d","e","f","g","h","i","j"];
test half_page_then_confirm {
actions: [half-page-down, confirm]
// viewport height=50, half=25, clamps to last item (index 9)
selected: "j"
}
}
nav mod half_page_small_height {
viewport: { height: 2, count: 10 };
test half_page_moves_one {
actions: [half-page-down]
cursor: 1
offset: 0
}
}
}