1
0
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:
Jesse Duffield
2021-04-02 15:08:15 +11:00
parent b4827a98ca
commit 1a5f380c00
9 changed files with 27 additions and 17 deletions

View File

@@ -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),