ensis-ui 3.0.1 → 3.0.2
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
|
@@ -6,6 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [3.0.2] - 2026-10-18
|
|
10
|
+
|
|
11
|
+
### 修复
|
|
12
|
+
|
|
13
|
+
- `RsTerminal`:全屏清屏前插入的 `CSI r` 会把光标拉到左上角。vim 的进入序列里常同时带清屏,这次复位发生在 `CSI ? 1049 h` 保存光标之前,退出后输入画在视口第一行。长输出把提示符顶在最后一行时尤其明显。现在复位滚动边距后把光标放回原位,再交给后续序列保存。
|
|
14
|
+
|
|
9
15
|
## [3.0.1] - 2026-10-15
|
|
10
16
|
|
|
11
17
|
### 修复
|
|
@@ -71,8 +71,9 @@ export declare function containsFullScreenClear(data: string): boolean;
|
|
|
71
71
|
/** 数据块以光标归位首行开头(top 每轮刷新常见) */
|
|
72
72
|
export declare function startsWithCursorHome(data: string): boolean;
|
|
73
73
|
/**
|
|
74
|
-
*
|
|
75
|
-
*
|
|
74
|
+
* 在本地解析层把滚动边距恢复成整屏(不发给 PTY)。
|
|
75
|
+
* `CSI r` 会把光标拉到左上角。若它排在 `CSI ? 1049 h` 之前,vim 保存的就是顶行,
|
|
76
|
+
* 退出后输入画在视口顶部。长输出把提示符顶在最后一行时尤其明显,所以复位后把光标放回原位。
|
|
76
77
|
*/
|
|
77
78
|
export declare function resetLocalTerminalModes(terminal: Terminal): void;
|
|
78
79
|
export declare function snapTerminalViewportToBottom(terminal: Terminal): void;
|
|
@@ -187,11 +187,15 @@ function containsFullScreenClear(data) {
|
|
|
187
187
|
return FULL_SCREEN_CLEAR_PATTERN.test(data);
|
|
188
188
|
}
|
|
189
189
|
/**
|
|
190
|
-
*
|
|
191
|
-
*
|
|
190
|
+
* 在本地解析层把滚动边距恢复成整屏(不发给 PTY)。
|
|
191
|
+
* `CSI r` 会把光标拉到左上角。若它排在 `CSI ? 1049 h` 之前,vim 保存的就是顶行,
|
|
192
|
+
* 退出后输入画在视口顶部。长输出把提示符顶在最后一行时尤其明显,所以复位后把光标放回原位。
|
|
192
193
|
*/
|
|
193
194
|
function resetLocalTerminalModes(terminal) {
|
|
194
|
-
terminal.
|
|
195
|
+
const buffer = terminal.buffer.active;
|
|
196
|
+
const row = buffer.cursorY + 1;
|
|
197
|
+
const col = Math.min(buffer.cursorX, Math.max(terminal.cols - 1, 0)) + 1;
|
|
198
|
+
terminal.write(`\x1b[r\x1b[${row};${col}H`);
|
|
195
199
|
}
|
|
196
200
|
function snapTerminalViewportToBottom(terminal) {
|
|
197
201
|
terminal.scrollToBottom();
|