mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 03:10:46 +08:00
Prefer xterm visible line for WebCRT command audit on Enter.
PTY stdout/stdin carry backspace and edit noise during typing; record only the final row the operator sees when pressing Enter. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
6ea14e6d5e
commit
b35e56afb0
4 changed files with 42 additions and 18 deletions
|
|
@ -778,7 +778,11 @@ export const WebTerminal = forwardRef<WebTerminalHandle, Props>(function WebTerm
|
|||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
maybeFocus();
|
||||
sendStdinImmediate(data);
|
||||
if (e.key === "Enter") {
|
||||
sendStdinWithAudit("\r", auditLineForEnter(term));
|
||||
return;
|
||||
}
|
||||
sendStdinWithAudit(data);
|
||||
};
|
||||
window.addEventListener("keydown", onKeyDownCapture, true);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue