Set inline separator caps per side

This commit is contained in:
Junegunn Choi
2026-04-19 20:42:33 +09:00
parent 6f3e5de150
commit d247284bc3
2 changed files with 6 additions and 2 deletions

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)

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)