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

Add scrollbar

Close #3096
This commit is contained in:
Junegunn Choi
2023-01-01 14:48:14 +09:00
parent ec20dfe312
commit 5cd6f1d064
7 changed files with 116 additions and 9 deletions

View File

@@ -176,6 +176,7 @@ func (r *LightRenderer) Init() {
if r.mouse {
r.csi("?1000h")
r.csi("?1002h")
r.csi("?1006h")
}
r.csi(fmt.Sprintf("%dA", r.MaxY()-1))
@@ -569,12 +570,14 @@ func (r *LightRenderer) mouseSequence(sz *int) Event {
// ctrl := t & 0b1000
mod := t&0b1100 > 0
drag := t&0b100000 > 0
if scroll != 0 {
return Event{Mouse, 0, &MouseEvent{y, x, scroll, false, false, false, mod}}
}
double := false
if down {
if down && !drag {
now := time.Now()
if !left { // Right double click is not allowed
r.clickY = []int{}