fix(tui): fixed no-append live-region repaints during viewport shifts

- Constrained the no-append repaint optimization to execute only when the logical viewport position was unchanged.
- Documented the live-region pinned repaint cursor re-anchoring fix in the TUI changelog entry.
This commit is contained in:
can1357
2026-06-07 08:50:14 +02:00
parent 8543dcaee4
commit a40f01c1e9
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -32,6 +32,7 @@
- Fixed fullscreen overlay alt-frame rendering to reuse the current line-preparation path instead of calling removed fitting helpers.
- Reduced TUI render-path line fitting by deferring overlay base-frame fitting until an overlay rebuild and by reusing already-fitted lines in emitters.
- Reduced live-region pinned repaint output by diffing unchanged viewport rows when no sealed rows are being committed to native scrollback.
- Fixed no-append live-region pinned repaints to re-anchor the hardware cursor when the logical viewport shifts.
- Fixed keybinding matching so printable uppercase input preserves `Shift` for bindings such as `shift+a`.
- Optimized terminal image-line detection and Thai/Lao AM normalization checks to avoid hot-path regex scans and substring allocations.
- Fixed `Markdown.render()` cache hits returning the cache's mutable backing array, which let callers that append extra rows corrupt cached Markdown and duplicate those rows on every redraw.
+1 -1
View File
@@ -2849,7 +2849,7 @@ export class TUI extends Container {
const boundedAppendTo = Math.max(0, Math.min(appendTo, naturalViewportTop, lines.length));
const boundedAppendFrom = Math.max(0, Math.min(appendFrom, boundedAppendTo));
if (boundedAppendFrom === boundedAppendTo) {
if (boundedAppendFrom === boundedAppendTo && viewportTop === prevViewportTop) {
let firstChangedScreenRow = -1;
let lastChangedScreenRow = -1;
for (let screenRow = 0; screenRow < height; screenRow++) {