Commit 7aeb3df
authored
Fix flickering screen for most Terminals (#164)
frame() correctly implements DEC 2026 synchronized output, which allows
for "clear screen" sequences to be used while redrawing the screen
without flicker.
However, two issues prevent it from working. First, the clear sequence
is *outside of the sync frame*. Second, when moved within the frame,
the write() method detects ``x1b[2J`` and auto triggers a buffer flush,
bypassing the intended synchronization.
Finally, terminals that do not support DEC 2026 will always flicker with
clear sequence at every frame. But to me, it seems to me that the clear
sequence is not needed during this kind of draw, as each line is written
with explicit cursor positioning, please review!
I suggest also to include HOME to ensure (0,0) position before and after
clear, as some terminals can have indeterminate cursor position.1 parent 450ddfa commit 7aeb3df
File tree
3 files changed
+15
-11
lines changed- pytermgui
- window_manager
3 files changed
+15
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
| 361 | + | |
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | | - | |
458 | | - | |
| 457 | + | |
| 458 | + | |
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
| 535 | + | |
535 | 536 | | |
536 | 537 | | |
537 | 538 | | |
| |||
565 | 566 | | |
566 | 567 | | |
567 | 568 | | |
568 | | - | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
569 | 574 | | |
570 | 575 | | |
571 | 576 | | |
| |||
574 | 579 | | |
575 | 580 | | |
576 | 581 | | |
577 | | - | |
| 582 | + | |
578 | 583 | | |
579 | 584 | | |
580 | 585 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
259 | 258 | | |
260 | 259 | | |
261 | 260 | | |
| |||
0 commit comments