fix(cli): resolve Ctrl+Enter and Ctrl+J newline issues (#17021)

This commit is contained in:
imadraude
2026-01-20 23:56:33 +02:00
committed by GitHub
parent 67d69084e9
commit 645e2ec041
2 changed files with 33 additions and 3 deletions

View File

@@ -524,9 +524,9 @@ function* emitKeys(
// carriage return
name = 'return';
meta = escaped;
} else if (ch === '\n') {
// Enter, should have been called linefeed
name = 'enter';
} else if (escaped && ch === '\n') {
// Alt+Enter (linefeed), should be consistent with carriage return
name = 'return';
meta = escaped;
} else if (ch === '\t') {
// tab