Skip to content

Commit c5d1d4e

Browse files
ssddOnTopforge-code-agent
authored andcommitted
fix(zsh): use .accept-line instead of .send-break in forge reset
1 parent 33879e6 commit c5d1d4e

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

shell-plugin/lib/helpers.zsh

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)