summaryrefslogtreecommitdiffstats
path: root/src/tui
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2017-01-22 03:19:50 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2017-01-22 03:19:50 +0900
commit2a669e9a1754c71fb88c6a316378ee708d710efd (patch)
treef71ab0076d4f5046e9ba41263fcbc6960d2bdb0a /src/tui
parent5130abe76fe4afc9fe22df023fd3d3e715dcc014 (diff)
Clear lines even when background color is not set
Also revert the workaround in Vim plugin introduced in fa7c897. Related: #814
Diffstat (limited to 'src/tui')
-rw-r--r--src/tui/light.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/tui/light.go b/src/tui/light.go
index 075fd6bc..17cc6aec 100644
--- a/src/tui/light.go
+++ b/src/tui/light.go
@@ -185,11 +185,10 @@ func (r *LightRenderer) Init() {
_, x := r.findOffset()
if x > 0 {
r.upOneLine = true
- r.stderr("\n")
+ r.makeSpace()
}
for i := 1; i < r.MaxY(); i++ {
- r.stderr("\n")
- r.csi("G")
+ r.makeSpace()
}
if r.mouse {
@@ -197,12 +196,19 @@ func (r *LightRenderer) Init() {
}
r.csi(fmt.Sprintf("%dA", r.MaxY()-1))
r.csi("G")
+ r.csi("K")
// r.csi("s")
if r.mouse {
r.yoffset, _ = r.findOffset()
}
}
+func (r *LightRenderer) makeSpace() {
+ r.stderr("\n")
+ r.csi("G")
+ r.csi("K")
+}
+
func (r *LightRenderer) move(y int, x int) {
// w.csi("u")
if r.y < y {