fix(tui): handle split Shift+Enter in VS Code
This commit is contained in:
@@ -232,6 +232,7 @@ export class Editor implements Component {
|
||||
// Bracketed paste mode buffering
|
||||
private pasteBuffer: string = "";
|
||||
private isInPaste: boolean = false;
|
||||
private pendingShiftEnter: boolean = false;
|
||||
|
||||
// Prompt history for up/down navigation
|
||||
private history: string[] = [];
|
||||
@@ -422,6 +423,21 @@ export class Editor implements Component {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.pendingShiftEnter) {
|
||||
if (data === "\r") {
|
||||
this.pendingShiftEnter = false;
|
||||
this.addNewLine();
|
||||
return;
|
||||
}
|
||||
this.pendingShiftEnter = false;
|
||||
this.insertCharacter("\\");
|
||||
}
|
||||
|
||||
if (data === "\\") {
|
||||
this.pendingShiftEnter = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// Ctrl+C - let parent handle (exit/clear)
|
||||
if (kb.matches(data, "copy")) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user