summaryrefslogtreecommitdiff
path: root/src/tui/light.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2023-01-01 14:48:14 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2023-01-01 14:48:14 +0900
commit5cd6f1d06427f1e023573be084e384227fae3cdf (patch)
tree912b9359e1767e4de768df65206547eedfac729f /src/tui/light.go
parentec20dfe312fb31dca2ebf7aa0caa05cd582cf131 (diff)
downloadfzf-5cd6f1d06427f1e023573be084e384227fae3cdf.tar.gz
Add scrollbar
Close #3096
Diffstat (limited to 'src/tui/light.go')
-rw-r--r--src/tui/light.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tui/light.go b/src/tui/light.go
index 4225fc52..83020a71 100644
--- a/src/tui/light.go
+++ b/src/tui/light.go
@@ -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{}