mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 06:04:40 +00:00
fix(tui): restore legacy newline handling
This commit is contained in:
parent
ba5eb05f44
commit
20d704fee1
1 changed files with 8 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue