Commit d6e42e6
fix(cli): eliminate TUI flash on key navigation entirely
Replace terminal.clear() with a zero-flash technique: toggle an invisible
BOLD modifier on all cells in the translations panel when the key changes.
Bold-on-space is visually identical to normal-space, but ratatui's diff
renderer treats it as "changed" and re-sends every cell in the area,
overwriting ghost glyphs from Arabic/Bengali/Hindi complex-script characters.
Previously, terminal.clear() sent a ClearType::All escape code causing a
full-screen flash. The later "detect complex scripts" heuristic was also
ineffective because multilingual files have complex-script translations on
every key.
The fix is purely in ratatui's buffer layer — no escape codes, no screen
blanking. frame.buffer_mut().set_style() stamps the alternating style onto
all cells before any widget renders; widgets overwrite content cells with
their own styles, so only empty cells retain the toggled BOLD, keeping them
visually invisible while forcing a diff-driven re-send.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 2ca0216 commit d6e42e6
3 files changed
Lines changed: 28 additions & 58 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
78 | 82 | | |
79 | 83 | | |
80 | 84 | | |
| |||
128 | 132 | | |
129 | 133 | | |
130 | 134 | | |
| 135 | + | |
131 | 136 | | |
132 | 137 | | |
133 | 138 | | |
| |||
396 | 401 | | |
397 | 402 | | |
398 | 403 | | |
| 404 | + | |
399 | 405 | | |
400 | 406 | | |
401 | 407 | | |
| |||
416 | 422 | | |
417 | 423 | | |
418 | 424 | | |
| 425 | + | |
419 | 426 | | |
420 | 427 | | |
421 | 428 | | |
| |||
435 | 442 | | |
436 | 443 | | |
437 | 444 | | |
| 445 | + | |
438 | 446 | | |
439 | 447 | | |
440 | 448 | | |
| |||
468 | 476 | | |
469 | 477 | | |
470 | 478 | | |
| 479 | + | |
471 | 480 | | |
472 | 481 | | |
473 | 482 | | |
| |||
482 | 491 | | |
483 | 492 | | |
484 | 493 | | |
| 494 | + | |
485 | 495 | | |
486 | 496 | | |
487 | 497 | | |
| |||
497 | 507 | | |
498 | 508 | | |
499 | 509 | | |
| 510 | + | |
500 | 511 | | |
501 | 512 | | |
502 | 513 | | |
| |||
511 | 522 | | |
512 | 523 | | |
513 | 524 | | |
| 525 | + | |
514 | 526 | | |
515 | 527 | | |
516 | 528 | | |
517 | 529 | | |
518 | 530 | | |
519 | 531 | | |
520 | 532 | | |
| 533 | + | |
521 | 534 | | |
522 | 535 | | |
523 | 536 | | |
| |||
527 | 540 | | |
528 | 541 | | |
529 | 542 | | |
| 543 | + | |
530 | 544 | | |
531 | 545 | | |
532 | 546 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
92 | 90 | | |
93 | 91 | | |
94 | 92 | | |
| |||
101 | 99 | | |
102 | 100 | | |
103 | 101 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | 102 | | |
130 | 103 | | |
131 | 104 | | |
132 | 105 | | |
133 | 106 | | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | | - | |
| 118 | + | |
120 | 119 | | |
121 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
122 | 134 | | |
123 | 135 | | |
124 | 136 | | |
| |||
0 commit comments