Empty --marker-multi-line if --marker is empty

This commit is contained in:
Junegunn Choi 2024-06-25 20:49:42 +09:00
parent 3b944addd4
commit 0420ed4f2a
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627
2 changed files with 3 additions and 8 deletions

View File

@ -23,11 +23,7 @@ CHANGELOG
- Pointer and marker signs can be set to empty strings
```sh
# Minimal style
fzf --pointer '' --marker '' --info hidden
# When --read0 is specified, there can be multi-line entries,
# so you need to set --marker-multi-line to an empty string
find . -print0 | fzf --read0 --pointer '' --marker-multi-line '' --info hidden
fzf --pointer '' --marker '' --prompt '' --info hidden
```
- Better cache management and improved rendering for `--tail`
- Improved `--sync` behavior

View File

@ -2788,10 +2788,9 @@ func postProcessOptions(opts *Options) error {
opts.Pointer = &defaultPointer
}
multiLine := opts.MultiLine && opts.ReadZero
markerLen := 1
if opts.Marker == nil {
if multiLine && opts.MarkerMulti != nil && opts.MarkerMulti[0] == "" {
if opts.MarkerMulti != nil && opts.MarkerMulti[0] == "" {
empty := ""
opts.Marker = &empty
markerLen = 0
@ -2809,7 +2808,7 @@ func postProcessOptions(opts *Options) error {
markerMultiLen := 1
if opts.MarkerMulti == nil {
if !multiLine && *opts.Marker == "" {
if *opts.Marker == "" {
opts.MarkerMulti = &[3]string{}
markerMultiLen = 0
} else if opts.Unicode {