mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 06:04:51 +00:00
fix(tui): ignore unsupported Kitty CSI-u modifiers closes #1807
This commit is contained in:
parent
8e157412a6
commit
49749407fa
5 changed files with 25 additions and 1 deletions
|
|
@ -361,6 +361,16 @@ describe("Editor component", () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe("Kitty CSI-u handling", () => {
|
||||
it("ignores printable CSI-u sequences with unsupported modifiers", () => {
|
||||
const editor = new Editor(createTestTUI(), defaultEditorTheme);
|
||||
|
||||
editor.handleInput("\x1b[99;9u");
|
||||
|
||||
assert.strictEqual(editor.getText(), "");
|
||||
});
|
||||
});
|
||||
|
||||
describe("Unicode text editing behavior", () => {
|
||||
it("inserts mixed ASCII, umlauts, and emojis as literal text", () => {
|
||||
const editor = new Editor(createTestTUI(), defaultEditorTheme);
|
||||
|
|
|
|||
|
|
@ -294,6 +294,12 @@ describe("parseKey", () => {
|
|||
assert.strictEqual(parseKey(latinCtrlC), "ctrl+c");
|
||||
setKittyProtocolActive(false);
|
||||
});
|
||||
|
||||
it("should ignore Kitty CSI-u with unsupported modifiers", () => {
|
||||
setKittyProtocolActive(true);
|
||||
assert.strictEqual(parseKey("\x1b[99;9u"), undefined);
|
||||
setKittyProtocolActive(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("Legacy key parsing", () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue