mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-08-06 11:02:41 +03:00
support alt-enter for inserting newline when typing commit message within the app
This commit is contained in:
7
vendor/github.com/jesseduffield/gocui/tcell_driver.go
generated
vendored
7
vendor/github.com/jesseduffield/gocui/tcell_driver.go
generated
vendored
@@ -151,7 +151,14 @@ func pollEvent() GocuiEvent {
|
||||
// - shift - will be translated to the final code of rune
|
||||
// - ctrl - is translated in the key
|
||||
mod = 0
|
||||
} else if mod == tcell.ModAlt && k == tcell.KeyEnter {
|
||||
// for the sake of convenience I'm having a KeyAltEnter key. I will likely
|
||||
// regret this laziness in the future. We're arbitrarily mapping that to tcell's
|
||||
// KeyF64.
|
||||
mod = 0
|
||||
k = tcell.KeyF64
|
||||
}
|
||||
|
||||
return GocuiEvent{
|
||||
Type: eventKey,
|
||||
Key: Key(k),
|
||||
|
Reference in New Issue
Block a user