diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2017-01-10 22:55:55 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2017-01-10 22:55:55 +0900 |
commit | 0c127cfdc1b62a3b5ca1730fd1e60a406b9ee54b (patch) | |
tree | 0203a6029a7aebdbdf2cbf533ea0844529ccb237 /src | |
parent | ae274158de38181bca27f2ce54c8b4fc0b688eff (diff) |
No need to query row position of the cursor if mouse is disabled
Diffstat (limited to 'src')
-rw-r--r-- | src/tui/light.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tui/light.go b/src/tui/light.go index 379680c1..574d161e 100644 --- a/src/tui/light.go +++ b/src/tui/light.go @@ -185,7 +185,9 @@ func (r *LightRenderer) Init() { r.csi(fmt.Sprintf("%dA", r.MaxY()-1)) r.csi("G") // r.csi("s") - r.yoffset, _ = r.findOffset() + if r.mouse { + r.yoffset, _ = r.findOffset() + } } func (r *LightRenderer) move(y int, x int) { |