diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2023-05-16 23:45:31 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2023-05-16 23:45:31 +0900 |
| commit | 43436e48e0dacb51f9ab3da84b4c1ec697b744da (patch) | |
| tree | 6e4465fdcad864ea4a79dd52307519ce43d10467 /src/options.go | |
| parent | 5a391024059e055f9e21b997ff77e1b4ba5302c5 (diff) | |
| download | fzf-43436e48e0dacb51f9ab3da84b4c1ec697b744da.tar.gz | |
Add new border style: 'block'
Diffstat (limited to 'src/options.go')
| -rw-r--r-- | src/options.go | 8 |
1 files changed, 6 insertions, 2 deletions
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": |
