mirror of
https://github.com/junegunn/fzf.git
synced 2026-08-11 18:32:36 +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:
@@ -596,6 +596,7 @@ const (
|
||||
BorderLeft
|
||||
BorderRight
|
||||
BorderInline
|
||||
BorderDashed
|
||||
)
|
||||
|
||||
func (s BorderShape) HasLeft() bool {
|
||||
@@ -759,6 +760,23 @@ func MakeBorderStyle(shape BorderShape, unicode bool) BorderStyle {
|
||||
leftMid: '╠',
|
||||
rightMid: '╣',
|
||||
}
|
||||
case BorderDashed:
|
||||
// Terminal cells are taller than wide (~2:1), so horizontals can use a
|
||||
// sparse stub per cell while verticals need more dashes per cell to look
|
||||
// evenly dashed. Rounded corners and sharp T-junction mids.
|
||||
return BorderStyle{
|
||||
shape: shape,
|
||||
top: '╶',
|
||||
bottom: '╶',
|
||||
left: '┆',
|
||||
right: '┆',
|
||||
topLeft: '╭',
|
||||
topRight: '╮',
|
||||
bottomLeft: '╰',
|
||||
bottomRight: '╯',
|
||||
leftMid: '├',
|
||||
rightMid: '┤',
|
||||
}
|
||||
}
|
||||
return BorderStyle{
|
||||
shape: shape,
|
||||
|
||||
Reference in New Issue
Block a user