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
This commit is contained in:
Junegunn Choi 2017-08-09 01:58:09 +09:00
parent 462c68b625
commit dc55e68524
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -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()
}