summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMateusz Czapliński <czapkofan@gmail.com>2018-10-20 01:00:13 +0200
committerMateusz Czapliński <czapkofan@gmail.com>2018-10-20 01:00:13 +0200
commit67641cdce299d132a9b3035d00fa2cbabe408b66 (patch)
tree8cae402819f4e67c53532da4abae8e6959b82abf
parent206168df50f432405b2440a434a5fb58aa43ce38 (diff)
fix left-clip markers
-rw-r--r--up.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/up.go b/up.go
index 8d94e05..7682632 100644
--- a/up.go
+++ b/up.go
@@ -297,9 +297,11 @@ func (v *BufView) Draw(tui tcell.Screen) {
}
w, h := tui.Size()
+ lclip := false
drawch := func(x, y int, ch rune) {
if x <= v.X && v.X != 0 {
x, ch = 0, '«'
+ lclip = true
} else {
x -= v.X
}
@@ -313,6 +315,10 @@ func (v *BufView) Draw(tui tcell.Screen) {
if x < 0 {
x = 0
}
+ if x == 0 && lclip {
+ x++
+ }
+ lclip = false
for ; x < w; x++ {
tui.SetCell(x, y, tcell.StyleDefault, ' ')
}