fix some things with inputs in rename mode
- SHA
e782f7fdbe99dbb00cf449d67d6db389786522e2- Parents
-
954f4a6 - Tree
be2688d
e782f7f
e782f7fdbe99dbb00cf449d67d6db389786522e2954f4a6
be2688d| Status | File | + | - |
|---|---|---|---|
| M |
src/display_module.f90
|
1 | 1 |
| M |
src/fuss_main.f90
|
6 | 5 |
src/display_module.f90modified@@ -180,7 +180,7 @@ contains | ||
| 180 | 180 | print '(A)', '' |
| 181 | 181 | if (in_rename_mode) then |
| 182 | 182 | ! Rename mode help - show in cyan |
| 183 | - print '(A)', achar(27) // '[36mRENAME MODE: Type new name | ←/→:move cursor | Backspace:delete | Enter/Tab:confirm | ESC:cancel' // achar(27) // '[0m' | |
| 183 | + print '(A)', achar(27) // '[36mRENAME MODE: Type name (caps A/B ok, C/D use arrows) | ←/→:cursor | Backspace:del | Tab:save | ESC:cancel' // achar(27) // '[0m' | |
| 184 | 184 | else if (mode == 'git') then |
| 185 | 185 | ! Git mode help - show in yellow tint |
| 186 | 186 | print '(A)', achar(27) // '[33mLegend: ' // achar(27) // '[32m↑' // achar(27) // '[0m=staged ' // & |
src/fuss_main.f90modified@@ -465,23 +465,24 @@ contains | ||
| 465 | 465 | needs_full_redraw = .true. |
| 466 | 466 | end if |
| 467 | 467 | cycle |
| 468 | + ! NOTE: Arrow keys (after escape processing) are indistinguishable from uppercase A/B/C/D | |
| 469 | + ! Trade-off: Prioritize arrow functionality over uppercase C/D letters | |
| 470 | + ! Uppercase A/B work fine, C/D reserved for arrows | |
| 468 | 471 | else if (key == 'C') then |
| 469 | - ! Right arrow - move cursor right | |
| 472 | + ! Right arrow - move cursor right (also blocks uppercase C) | |
| 470 | 473 | if (rename_cursor_pos < len_trim(rename_buffer)) then |
| 471 | 474 | rename_cursor_pos = rename_cursor_pos + 1 |
| 472 | 475 | needs_full_redraw = .true. |
| 473 | 476 | end if |
| 474 | 477 | cycle |
| 475 | 478 | else if (key == 'D') then |
| 476 | - ! Left arrow - move cursor left | |
| 479 | + ! Left arrow - move cursor left (also blocks uppercase D) | |
| 477 | 480 | if (rename_cursor_pos > 0) then |
| 478 | 481 | rename_cursor_pos = rename_cursor_pos - 1 |
| 479 | 482 | needs_full_redraw = .true. |
| 480 | 483 | end if |
| 481 | 484 | cycle |
| 482 | - else if (key == 'A' .or. key == 'B') then | |
| 483 | - ! Up/Down arrows - ignore in rename mode | |
| 484 | - cycle | |
| 485 | + ! A and B (up/down arrows) are allowed as uppercase letters - arrows ignored | |
| 485 | 486 | else if ((key >= 'a' .and. key <= 'z') .or. & |
| 486 | 487 | (key >= 'A' .and. key <= 'Z') .or. & |
| 487 | 488 | (key >= '0' .and. key <= '9') .or. & |