@code-yeongyu/senpi-tui 2026.11.3-3 → 2026.11.5-1
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/dist/terminal.js +3 -0
- package/dist/tui.js +5 -2
- package/package.json +1 -1
package/dist/terminal.js
CHANGED
|
@@ -336,6 +336,9 @@ export class ProcessTerminal {
|
|
|
336
336
|
const cb = typeof encodingOrCallback === "function" ? encodingOrCallback : callback;
|
|
337
337
|
const encoding = typeof encodingOrCallback === "string" ? encodingOrCallback : undefined;
|
|
338
338
|
const text = typeof chunk === "string" ? chunk : Buffer.from(chunk).toString(encoding);
|
|
339
|
+
if (/^\x1b]52;c;(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?\x07(?![\s\S])/.test(text)) {
|
|
340
|
+
return rawWrite(text, cb);
|
|
341
|
+
}
|
|
339
342
|
if (!handler || this.forwardingExternalWrite) {
|
|
340
343
|
this.noteExternalWrite();
|
|
341
344
|
rawWrite(text);
|
package/dist/tui.js
CHANGED
|
@@ -2774,9 +2774,12 @@ export class TuiBase extends Container {
|
|
|
2774
2774
|
const isImage = isImageLine(line);
|
|
2775
2775
|
const imageReservedRows = isImage ? this.getKittyImageReservedRows(newLines, i, renderEnd) : 1;
|
|
2776
2776
|
if (imageReservedRows > 1) {
|
|
2777
|
+
// Reserving rows at or past the viewport bottom scrolls the terminal exactly like appended text, and the
|
|
2778
|
+
// relative move back up still lands on the image's first row; only an image that starts above the viewport
|
|
2779
|
+
// or is taller than it cannot be placed in place (senpi#4583).
|
|
2777
2780
|
const imageStartScreenRow = i - viewportTop;
|
|
2778
|
-
if (imageStartScreenRow < 0 ||
|
|
2779
|
-
logRedraw(`kitty image
|
|
2781
|
+
if (imageStartScreenRow < 0 || imageReservedRows > height) {
|
|
2782
|
+
logRedraw(`kitty image cannot be placed in place (start row ${imageStartScreenRow}, ${imageReservedRows} rows, height ${height})`);
|
|
2780
2783
|
fullRender(true, !preserveMuxScrollback);
|
|
2781
2784
|
return;
|
|
2782
2785
|
}
|
package/package.json
CHANGED