mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-12-04 10:34:55 +02:00
Could not type special characters on non-english keyboards
On german/french/spanish keyboards, typing [ requires modifier keys like AltGr, so the `mod==0` condition is wrong. Fixes #2573 ch != 0 is useless because IsPrint is implemented this way: if uint32(r) <= MaxLatin1 { return properties[uint8(r)]&128 != 0 } with properties[0] set to 1 (so, bit 7 not set) -> 0 is not printable.
This commit is contained in:
parent
7c44b76477
commit
4f807eeb19
@ -47,8 +47,7 @@ func (gui *Gui) handleEditorKeypress(textArea *gocui.TextArea, key gocui.Key, ch
|
|||||||
case key == gocui.KeyCtrlY:
|
case key == gocui.KeyCtrlY:
|
||||||
textArea.Yank()
|
textArea.Yank()
|
||||||
|
|
||||||
// TODO: see if we need all three of these conditions: maybe the final one is sufficient
|
case unicode.IsPrint(ch):
|
||||||
case ch != 0 && mod == 0 && unicode.IsPrint(ch):
|
|
||||||
textArea.TypeRune(ch)
|
textArea.TypeRune(ch)
|
||||||
default:
|
default:
|
||||||
return false
|
return false
|
||||||
|
Loading…
Reference in New Issue
Block a user