diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2025-01-15 22:23:52 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2025-01-15 22:23:52 +0900 |
| commit | 9d6637c1b3b3c7c0a6eadbc73fe887e11ab14b72 (patch) | |
| tree | 5965ff5a98e4dba7281a96c28474eb99df0550ea /src/options.go | |
| parent | 56fef7c8df2713261fbdbd396aa81ed23d9a945a (diff) | |
| download | fzf-9d6637c1b3b3c7c0a6eadbc73fe887e11ab14b72.tar.gz | |
Add gap line
Close #4182
Diffstat (limited to 'src/options.go')
| -rw-r--r-- | src/options.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/options.go b/src/options.go index 3932cb56..470d3081 100644 --- a/src/options.go +++ b/src/options.go @@ -582,6 +582,7 @@ type Options struct { HeaderLines int HeaderFirst bool Gap int + GapLine *string Ellipsis *string Scrollbar *string Margin [4]sizeSpec @@ -2567,6 +2568,15 @@ func parseOptions(index *int, opts *Options, allArgs []string) error { } case "--no-gap": opts.Gap = 0 + case "--gap-line": + if given, bar := optionalNextString(); given { + opts.GapLine = &bar + } else { + opts.GapLine = nil + } + case "--no-gap-line": + empty := "" + opts.GapLine = &empty case "--ellipsis": str, err := nextString("ellipsis string required") if err != nil { @@ -2987,6 +2997,14 @@ func postProcessOptions(opts *Options) error { opts.Pointer = &defaultPointer } + if opts.GapLine == nil { + defaultGapLine := "┈" + if !opts.Unicode { + defaultGapLine = "-" + } + opts.GapLine = &defaultGapLine + } + markerLen := 1 if opts.Marker == nil { if opts.MarkerMulti != nil && opts.MarkerMulti[0] == "" { |
