From 43436e48e0dacb51f9ab3da84b4c1ec697b744da Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Tue, 16 May 2023 23:45:31 +0900 Subject: Add new border style: 'block' --- src/options.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/options.go') diff --git a/src/options.go b/src/options.go index ba84c8b4..e50c1fcc 100644 --- a/src/options.go +++ b/src/options.go @@ -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": -- cgit v1.2.3