fix(tui): restore legacy newline handling
This commit is contained in:
@@ -622,7 +622,14 @@ export class Editor implements Component, Focusable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// New line
|
// 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)) {
|
if (this.shouldSubmitOnBackslashEnter(data, kb)) {
|
||||||
this.handleBackspace();
|
this.handleBackspace();
|
||||||
this.submitValue();
|
this.submitValue();
|
||||||
|
|||||||
Reference in New Issue
Block a user