@oh-my-pi/pi-tui 12.17.2 → 12.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [12.18.0] - 2026-02-21
6
+ ### Fixed
7
+
8
+ - Fixed viewport synchronization issue by clearing scrollback when terminal state becomes desynced during full re-renders
9
+
5
10
  ## [12.12.2] - 2026-02-19
6
11
 
7
12
  ### Fixed
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-tui",
4
- "version": "12.17.2",
4
+ "version": "12.18.0",
5
5
  "description": "Terminal User Interface library with differential rendering for efficient text-based applications",
6
6
  "homepage": "https://github.com/can1357/oh-my-pi",
7
7
  "author": "Can Bölük",
@@ -33,8 +33,8 @@
33
33
  "test": "bun test test/*.test.ts"
34
34
  },
35
35
  "dependencies": {
36
- "@oh-my-pi/pi-natives": "12.17.2",
37
- "@oh-my-pi/pi-utils": "12.17.2",
36
+ "@oh-my-pi/pi-natives": "12.18.0",
37
+ "@oh-my-pi/pi-utils": "12.18.0",
38
38
  "@types/mime-types": "^3.0.1",
39
39
  "chalk": "^5.6.2",
40
40
  "marked": "^17.0.2",
package/src/tui.ts CHANGED
@@ -1005,8 +1005,10 @@ export class TUI extends Container {
1005
1005
  // Use previousLines.length (not maxLinesRendered) to avoid false positives after content shrinks
1006
1006
  const previousContentViewportTop = Math.max(0, this.#previousLines.length - height);
1007
1007
  if (firstChanged < previousContentViewportTop) {
1008
- // First change is above previous viewport - need full re-render
1008
+ // First change is above previous viewport - need hard full re-render
1009
+ // Force scrollback clear here because terminal state is likely desynced.
1009
1010
  logRedraw(`firstChanged < viewportTop (${firstChanged} < ${previousContentViewportTop})`);
1011
+ this.#clearScrollbackOnNextFullRender = true;
1010
1012
  fullRender(true);
1011
1013
  return;
1012
1014
  }