summaryrefslogtreecommitdiffstats
path: root/src/tui
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2017-08-09 01:58:09 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2017-08-09 01:58:29 +0900
commitdc55e68524a84544417c1ce290df447c4f0b1d60 (patch)
tree5b8ffcf7b2fbbfc816afe95889b3bcf8f9b8cae9 /src/tui
parent462c68b625e30964d24ef0d26b5e82169f506f0c (diff)
Remove unnecessary SCP (Save Cursor Position)
It is reported that it can have an unwanted side effect of clearing the screen on terminal emulators that do not properly support it. Patch suggested by @arya. Close #1011
Diffstat (limited to 'src/tui')
-rw-r--r--src/tui/light.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tui/light.go b/src/tui/light.go
index f9059180..15f4e012 100644
--- a/src/tui/light.go
+++ b/src/tui/light.go
@@ -209,7 +209,9 @@ func (r *LightRenderer) Init() {
r.csi(fmt.Sprintf("%dA", r.MaxY()-1))
r.csi("G")
r.csi("K")
- r.csi("s")
+ if !r.clearOnExit && !r.fullscreen {
+ r.csi("s")
+ }
if !r.fullscreen && r.mouse {
r.yoffset, _ = r.findOffset()
}