summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2021-04-06 18:01:02 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2021-04-06 18:01:29 +0900
commit3d37a5ba1d2781c4ab1cec864cae2cf308cb1305 (patch)
tree4238cc31af9d22e821dce6fb7e6048f8a14f2169
parent15f4cfb6d90915135454a1eee1e1c8198b184426 (diff)
Apply preview-bg color to preview border of all shapes
-rw-r--r--src/tui/light.go18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/tui/light.go b/src/tui/light.go
index 8f83c171..91b4c18e 100644
--- a/src/tui/light.go
+++ b/src/tui/light.go
@@ -693,13 +693,17 @@ func (w *LightWindow) drawBorder() {
}
func (w *LightWindow) drawBorderHorizontal(top, bottom bool) {
+ color := ColBorder
+ if w.preview {
+ color = ColPreviewBorder
+ }
if top {
w.Move(0, 0)
- w.CPrint(ColBorder, repeat(w.border.horizontal, w.width))
+ w.CPrint(color, repeat(w.border.horizontal, w.width))
}
if bottom {
w.Move(w.height-1, 0)
- w.CPrint(ColBorder, repeat(w.border.horizontal, w.width))
+ w.CPrint(color, repeat(w.border.horizontal, w.width))
}
}
@@ -708,14 +712,18 @@ func (w *LightWindow) drawBorderVertical(left, right bool) {
if !left || !right {
width++
}
+ color := ColBorder
+ if w.preview {
+ color = ColPreviewBorder
+ }
for y := 0; y < w.height; y++ {
w.Move(y, 0)
if left {
- w.CPrint(ColBorder, string(w.border.vertical))
+ w.CPrint(color, string(w.border.vertical))
}
- w.CPrint(ColBorder, repeat(' ', width))
+ w.CPrint(color, repeat(' ', width))
if right {
- w.CPrint(ColBorder, string(w.border.vertical))
+ w.CPrint(color, string(w.border.vertical))
}
}
}