File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed
Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -42,20 +42,8 @@ function _forge_reset() {
4242 # Clear buffer and reset cursor position
4343 BUFFER=" "
4444 CURSOR=0
45- # Use the builtin .send-break to end the ZLE edit cycle without printing
46- # the buffer or adding a visible blank line.
47- #
48- # .send-break (Ctrl+G) aborts the current line editor, clears the buffer,
49- # and triggers a fresh prompt cycle at the current terminal cursor position.
50- # Unlike .accept-line (which prints an empty buffer + newline, producing a
51- # visible blank line), .send-break cleanly transitions to the new prompt.
52- #
53- # We must NOT use `zle reset-prompt` here because it redraws at the
54- # position where ZLE *thinks* the cursor is -- which is stale after
55- # _forge_exec_interactive wrote output directly to /dev/tty (bypassing
56- # ZLE's cursor tracking). That stale redraw overwrites the last few
57- # lines of output.
58- zle .send-break
45+
46+ zle .accept-line
5947}
6048
6149
You can’t perform that action at this time.
0 commit comments