mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-17 15:53:39 -05:00
Fix modifier detection for Backspace / Ctrl-H on Windows (#4582)
Windows sends different key events and modifier combinations to theFullscreenRenderer than a tcell FullscreenRenderer on Linux (-tags tcell). This led to Ctrl+H being misinterpreted (and therefore unbindable) on some Windows builds. Basically reverts changes to `src/tui/tcell.go` introduced by `a0cabe0`.
This commit is contained in:
@@ -371,10 +371,12 @@ func (r *FullscreenRenderer) GetChar() Event {
|
|||||||
}
|
}
|
||||||
case rune(tcell.KeyCtrlH):
|
case rune(tcell.KeyCtrlH):
|
||||||
switch {
|
switch {
|
||||||
|
case ctrl:
|
||||||
|
return keyfn('h')
|
||||||
case alt:
|
case alt:
|
||||||
return Event{AltBackspace, 0, nil}
|
return Event{AltBackspace, 0, nil}
|
||||||
case ctrl, none, shift:
|
case none, shift:
|
||||||
return keyfn('h')
|
return Event{Backspace, 0, nil}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case tcell.KeyCtrlI:
|
case tcell.KeyCtrlI:
|
||||||
|
|||||||
Reference in New Issue
Block a user