feat(config-toggle): add Left/Right arrows for directional value changes

Left/Right now adjust the highlighted value one step along the
OFF ← DEFAULT → ON scale, clamped at the ends (no wrap), complementing
Space which cycles through all states and wraps. Right steps toward ON,
Left toward OFF.

Extract the set/erase side-effect into __config_toggle_apply so Space,
Left, and Right share one implementation of the scope-aware
set -U/-g/-Ue/-eg logic. Update the in-panel keybind hint (now
width-padded via string pad so the border stays aligned) and the help
text and offline docs to cover the new keys.
This commit is contained in:
2026-06-11 03:07:17 -04:00
parent 608b0227cb
commit bddb068ec0
4 changed files with 98 additions and 28 deletions
+4 -2
View File
@@ -131,8 +131,10 @@ function __config_toggle_draw
printf '│%s│\n' $HBR
# ── Keybind hint ──────────────────────────────────────
printf '│ %s↑↓/jk: move Space: cycle Tab: scope q: quit%s │\n' \
$c_dim $c_reset
# Padded to the inner width so the right border stays aligned regardless
# of the hint text. string pad is width-aware (arrows count as 1 column).
set -l hint " ↑↓ move ←→ set Space cycle Tab scope q quit"
printf '│%s%s%s│\n' $c_dim (string pad -r -w $IW -- $hint) $c_reset
# ── Bottom border ─────────────────────────────────────
printf '└%s┘\n' $HBR