mirror of
https://github.com/junegunn/fzf.git
synced 2025-12-07 05:14:25 +08:00
Add new border style: 'block'
This commit is contained in:
@@ -63,7 +63,7 @@ const usage = `usage: fzf [options]
|
||||
(default: 10)
|
||||
--layout=LAYOUT Choose layout: [default|reverse|reverse-list]
|
||||
--border[=STYLE] Draw border around the finder
|
||||
[rounded|sharp|horizontal|vertical|
|
||||
[rounded|sharp|bold|block|double|horizontal|vertical|
|
||||
top|bottom|left|right|none] (default: rounded)
|
||||
--border-label=LABEL Label to print on the border
|
||||
--border-label-pos=COL Position of the border label
|
||||
@@ -544,6 +544,8 @@ func parseBorder(str string, optional bool) tui.BorderShape {
|
||||
return tui.BorderSharp
|
||||
case "bold":
|
||||
return tui.BorderBold
|
||||
case "block":
|
||||
return tui.BorderBlock
|
||||
case "double":
|
||||
return tui.BorderDouble
|
||||
case "horizontal":
|
||||
@@ -564,7 +566,7 @@ func parseBorder(str string, optional bool) tui.BorderShape {
|
||||
if optional && str == "" {
|
||||
return tui.DefaultBorderShape
|
||||
}
|
||||
errorExit("invalid border style (expected: rounded|sharp|bold|double|horizontal|vertical|top|bottom|left|right|none)")
|
||||
errorExit("invalid border style (expected: rounded|sharp|bold|block|double|horizontal|vertical|top|bottom|left|right|none)")
|
||||
}
|
||||
return tui.BorderNone
|
||||
}
|
||||
@@ -1430,6 +1432,8 @@ func parsePreviewWindowImpl(opts *previewOpts, input string, exit func(string))
|
||||
opts.border = tui.BorderSharp
|
||||
case "border-bold":
|
||||
opts.border = tui.BorderBold
|
||||
case "border-block":
|
||||
opts.border = tui.BorderBlock
|
||||
case "border-double":
|
||||
opts.border = tui.BorderDouble
|
||||
case "noborder", "border-none":
|
||||
|
||||
Reference in New Issue
Block a user