Set inline separator caps per side

This commit is contained in:
Junegunn Choi
2026-04-19 20:42:33 +09:00
parent 12199823ab
commit abfa60b7d0
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -1167,8 +1167,10 @@ func (w *LightWindow) DrawHSeparator(row int, windowType WindowType, useBottom b
line = w.border.bottom
}
var leftCap, rightCap rune
if shape.HasLeft() || shape.HasRight() {
if shape.HasLeft() {
leftCap = w.border.leftMid
}
if shape.HasRight() {
rightCap = w.border.rightMid
}
w.drawHLine(row, line, leftCap, rightCap, color)
+3 -1
View File
@@ -1067,8 +1067,10 @@ func (w *TcellWindow) DrawHSeparator(row int, windowType WindowType, useBottom b
line = w.borderStyle.bottom
}
var leftCap, rightCap rune
if shape.HasLeft() || shape.HasRight() {
if shape.HasLeft() {
leftCap = w.borderStyle.leftMid
}
if shape.HasRight() {
rightCap = w.borderStyle.rightMid
}
w.drawHLine(w.top+row, line, leftCap, rightCap, style)