mirror of
https://github.com/getpaseo/paseo.git
synced 2026-08-14 12:23:16 +00:00
Replay bracketed paste in terminal preamble
This commit is contained in:
@@ -106,6 +106,7 @@ describe("TerminalInputModeTracker", () => {
|
|||||||
applicationCursorKeys: false,
|
applicationCursorKeys: false,
|
||||||
bracketedPaste: true,
|
bracketedPaste: true,
|
||||||
});
|
});
|
||||||
|
expect(tracker.getPreamble()).toBe("\x1b[?2004h");
|
||||||
|
|
||||||
expect(tracker.feed("\x1b[?2004l").changed).toBe(true);
|
expect(tracker.feed("\x1b[?2004l").changed).toBe(true);
|
||||||
expect(tracker.getState()).toEqual({
|
expect(tracker.getState()).toEqual({
|
||||||
@@ -114,6 +115,7 @@ describe("TerminalInputModeTracker", () => {
|
|||||||
applicationCursorKeys: false,
|
applicationCursorKeys: false,
|
||||||
bracketedPaste: false,
|
bracketedPaste: false,
|
||||||
});
|
});
|
||||||
|
expect(tracker.getPreamble()).toBe("");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("ignores encoded key input sequences", () => {
|
it("ignores encoded key input sequences", () => {
|
||||||
|
|||||||
@@ -156,6 +156,9 @@ export class TerminalInputModeTracker {
|
|||||||
if (this.applicationCursorKeys) {
|
if (this.applicationCursorKeys) {
|
||||||
parts.push("\x1b[?1h");
|
parts.push("\x1b[?1h");
|
||||||
}
|
}
|
||||||
|
if (this.bracketedPaste) {
|
||||||
|
parts.push("\x1b[?2004h");
|
||||||
|
}
|
||||||
return parts.join("");
|
return parts.join("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user