mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-10 17:51:58 -07:00
Support binding of left-click and right-click
left-click and right-click are respectively bound to "ignore" and "toggle" (after implicitly moving the cursor) by default. Close #1130
This commit is contained in:
@@ -278,6 +278,8 @@ func defaultKeymap() map[int][]action {
|
||||
keymap[tui.Rune] = toActions(actRune)
|
||||
keymap[tui.Mouse] = toActions(actMouse)
|
||||
keymap[tui.DoubleClick] = toActions(actAccept)
|
||||
keymap[tui.LeftClick] = toActions(actIgnore)
|
||||
keymap[tui.RightClick] = toActions(actToggle)
|
||||
return keymap
|
||||
}
|
||||
|
||||
@@ -1766,6 +1768,10 @@ func (t *Terminal) Loop() {
|
||||
toggle()
|
||||
}
|
||||
req(reqList)
|
||||
if me.Left {
|
||||
return doActions(t.keymap[tui.LeftClick], tui.LeftClick)
|
||||
}
|
||||
return doActions(t.keymap[tui.RightClick], tui.RightClick)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user