fix(tui): restore legacy newline handling

This commit is contained in:
Mario Zechner 2026-02-03 01:35:44 +01:00
parent ba5eb05f44
commit 20d704fee1

View file

@ -622,7 +622,14 @@ export class Editor implements Component, Focusable {
}
// New line
if (kb.matches(data, "newLine")) {
if (
kb.matches(data, "newLine") ||
(data.charCodeAt(0) === 10 && data.length > 1) ||
data === "\x1b\r" ||
data === "\x1b[13;2~" ||
(data.length > 1 && data.includes("\x1b") && data.includes("\r")) ||
(data === "\n" && data.length === 1)
) {
if (this.shouldSubmitOnBackslashEnter(data, kb)) {
this.handleBackspace();
this.submitValue();