Skip to content

Commit 3303570

Browse files
authored
Merge pull request #96 from jesseduffield/fix-pasting-multi-line-text
Fix pasting multi-line text into the commit description
2 parents 7b51033 + 0346f2e commit 3303570

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gui.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,9 +1313,9 @@ func (g *Gui) onKey(ev *GocuiEvent) error {
13131313
// back to '\n' fixes pasting multi-line text from Ghostty, and doesn't
13141314
// seem harmful for other terminal emulators.
13151315
//
1316-
// KeyCtrlJ (int value 10) is '\r', and KeyCtrlM (int value 13) is '\n'.
1316+
// KeyCtrlJ (int value 10) is '\r'.
13171317
if g.IsPasting && ev.Key == KeyCtrlJ {
1318-
ev.Key = KeyCtrlM
1318+
ev.Key = KeyEnter
13191319
}
13201320

13211321
err := g.execKeybindings(g.currentView, ev)

0 commit comments

Comments
 (0)