m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-17 15:53:39 -05:00

Add key combinations for ctrl-delete and shift-delete (#3284)

Currently there is not option to bind ctrl-delete and shift-delete. As
suggested by issue #3240, shift-delete could be used to bind "delete
entry from history" as it is a common way to do so in other
applications, e.g. browsers.

This, however, does only implement to use the key combination itself and
does not assign a default action to any of them. This does enable to
call one's all predefined actions. With the exec action this can
expanded like the issue #3240 suggested.
If desirable, the key combinations could later get a default behavior.

Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
This commit is contained in:
Syphdias
2023-05-21 11:40:05 +02:00
committed by GitHub
parent e2dd2a133e
commit 37f258b1bf
6 changed files with 38 additions and 1 deletions

View File

@@ -413,6 +413,12 @@ func (r *FullscreenRenderer) GetChar() Event {
case tcell.KeyHome:
return Event{Home, 0, nil}
case tcell.KeyDelete:
if ctrl {
return Event{CtrlDelete, 0, nil}
}
if shift {
return Event{SDelete, 0, nil}
}
return Event{Del, 0, nil}
case tcell.KeyEnd:
return Event{End, 0, nil}