mirror of
https://github.com/junegunn/fzf.git
synced 2026-08-15 20:28:04 +08:00
Add dashed border style
New --border=dashed / --list-border=dashed / --header-border=dashed etc. Uses U+2576 (╶) for horizontal edges and U+2506 (┆) for verticals, with rounded corners (╭╮╰╯) and sharp T-junction mids (├┤). Terminal cells are taller than wide (~2:1), so horizontals use a sparse stub per cell while verticals need more dashes per cell to look evenly dashed. Works with inline sections.
This commit is contained in:
+2
-2
@@ -2155,7 +2155,7 @@ func (t *Terminal) adjustMarginAndPadding() (int, int, [4]int, [4]int) {
|
||||
if idx == 3 {
|
||||
extraMargin[idx] += 1 + bw
|
||||
}
|
||||
case tui.BorderRounded, tui.BorderSharp, tui.BorderBold, tui.BorderBlock, tui.BorderThinBlock, tui.BorderDouble:
|
||||
case tui.BorderRounded, tui.BorderSharp, tui.BorderBold, tui.BorderBlock, tui.BorderThinBlock, tui.BorderDouble, tui.BorderDashed:
|
||||
extraMargin[idx] += 1 + bw*(idx%2)
|
||||
}
|
||||
marginInt[idx] = sizeSpecToInt(idx, sizeSpec) + extraMargin[idx]
|
||||
@@ -3017,7 +3017,7 @@ func (t *Terminal) printLabel(window tui.Window, render labelPrinter, opts label
|
||||
return
|
||||
}
|
||||
switch borderShape {
|
||||
case tui.BorderHorizontal, tui.BorderTop, tui.BorderBottom, tui.BorderRounded, tui.BorderSharp, tui.BorderBold, tui.BorderBlock, tui.BorderThinBlock, tui.BorderDouble:
|
||||
case tui.BorderHorizontal, tui.BorderTop, tui.BorderBottom, tui.BorderRounded, tui.BorderSharp, tui.BorderBold, tui.BorderBlock, tui.BorderThinBlock, tui.BorderDouble, tui.BorderDashed:
|
||||
if redrawBorder {
|
||||
window.DrawHBorder()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user