From 0c127cfdc1b62a3b5ca1730fd1e60a406b9ee54b Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Tue, 10 Jan 2017 22:55:55 +0900 Subject: No need to query row position of the cursor if mouse is disabled --- src/tui/light.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/tui') 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) { -- cgit v1.2.3