mirror of
https://github.com/issadarkthing/gomu.git
synced 2025-04-26 13:49:21 +08:00
add more keybinding in finder
This commit is contained in:
parent
662029970d
commit
f04935bec5
4
popup.go
4
popup.go
@ -384,7 +384,7 @@ func searchPopup(stringsToMatch []string, handler func(selected string)) {
|
|||||||
input.SetInputCapture(func(e *tcell.EventKey) *tcell.EventKey {
|
input.SetInputCapture(func(e *tcell.EventKey) *tcell.EventKey {
|
||||||
|
|
||||||
switch e.Key() {
|
switch e.Key() {
|
||||||
case tcell.KeyCtrlN:
|
case tcell.KeyCtrlN, tcell.KeyDown, tcell.KeyCtrlJ:
|
||||||
currIndx := list.GetCurrentItem()
|
currIndx := list.GetCurrentItem()
|
||||||
// if last index
|
// if last index
|
||||||
if currIndx == list.GetItemCount()-1 {
|
if currIndx == list.GetItemCount()-1 {
|
||||||
@ -394,7 +394,7 @@ func searchPopup(stringsToMatch []string, handler func(selected string)) {
|
|||||||
}
|
}
|
||||||
list.SetCurrentItem(currIndx)
|
list.SetCurrentItem(currIndx)
|
||||||
|
|
||||||
case tcell.KeyCtrlP:
|
case tcell.KeyCtrlP, tcell.KeyUp, tcell.KeyCtrlK:
|
||||||
currIndx := list.GetCurrentItem()
|
currIndx := list.GetCurrentItem()
|
||||||
|
|
||||||
if currIndx == 0 {
|
if currIndx == 0 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user