Skip to content
This repository was archived by the owner on Oct 6, 2025. It is now read-only.

Commit 01c3c68

Browse files
committed
fix: make ctrl-c clear the prompt without quitting
1 parent 239eafe commit 01c3c68

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

commands/run.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,10 @@ func (p *prompt) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
259259
case tea.KeyEnter:
260260
p.Finalize()
261261
return p, tea.Quit
262-
case tea.KeyCtrlC, tea.KeyCtrlD:
262+
case tea.KeyCtrlC:
263+
p.text.SetValue("")
264+
return p, nil
265+
case tea.KeyCtrlD:
263266
p.text.SetValue("/bye")
264267
p.Finalize()
265268
return p, tea.Quit

0 commit comments

Comments
 (0)