@cplieger/web-terminal-ui 3.2.0 → 3.3.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/package.json +1 -1
- package/src/kernel/kernel.ts +11 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cplieger/web-terminal-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Reference touch-first browser UI for @cplieger/web-terminal-engine: a composable kernel + feature modules (tabs, activity monitor, mobile toolbar, context menu, IME, predictive echo, viewport handling) and CSS. One createTerminal() call.",
|
|
6
6
|
"license": "GPL-3.0-or-later",
|
package/src/kernel/kernel.ts
CHANGED
|
@@ -156,6 +156,17 @@ export function createTerminal(
|
|
|
156
156
|
if (!connection.sendBinary(out)) {
|
|
157
157
|
return;
|
|
158
158
|
}
|
|
159
|
+
// Classic-terminal behavior (GNOME/xterm): user input re-engages follow and
|
|
160
|
+
// snaps to the bottom, so typing while scrolled up jumps to the input line.
|
|
161
|
+
// Instant (not the jump-button's smooth scroll), so it isn't janky per
|
|
162
|
+
// keystroke. This is the ONLY thing that scrolls a held view down — program
|
|
163
|
+
// output never does (the scroll controller's follow/hold job is unchanged),
|
|
164
|
+
// so scrolling up to read while output streams is preserved. A no-op on the
|
|
165
|
+
// alt screen (no scrollback) and when already following. NOTE: every caller
|
|
166
|
+
// of sendBytes today is genuine user input (typed keys, paste, mobile
|
|
167
|
+
// toolbar); if mouse tracking is ever wired through ctx.send, its motion
|
|
168
|
+
// bytes must NOT come through here or the view would snap on every move.
|
|
169
|
+
scroll.scrollToBottom();
|
|
159
170
|
for (const obs of inputObservers) {
|
|
160
171
|
obs(out);
|
|
161
172
|
}
|