From 0346f2e7c0e81f1b568b53378a194b132742e85f Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Wed, 7 Jan 2026 22:51:16 +0100 Subject: [PATCH] Fix pasting multi-line text into the commit description The previous code only worked by accident because KeyCtrlM and KeyEnter happened to have the same value. Since the latest tcell update this is no longer true; fix this by using the right constant that we should have used already before. --- gui.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui.go b/gui.go index 39ba4743..45e1617a 100644 --- a/gui.go +++ b/gui.go @@ -1313,9 +1313,9 @@ func (g *Gui) onKey(ev *GocuiEvent) error { // back to '\n' fixes pasting multi-line text from Ghostty, and doesn't // seem harmful for other terminal emulators. // - // KeyCtrlJ (int value 10) is '\r', and KeyCtrlM (int value 13) is '\n'. + // KeyCtrlJ (int value 10) is '\r'. if g.IsPasting && ev.Key == KeyCtrlJ { - ev.Key = KeyCtrlM + ev.Key = KeyEnter } err := g.execKeybindings(g.currentView, ev)