diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2023-04-12 13:23:10 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2023-04-12 13:23:10 +0900 |
commit | 96670d5f16dcf23d590eb1d83d1de351b2e8fb15 (patch) | |
tree | b917e9a29a12d6db03e289f4a2ca29d35842d4b3 | |
parent | 36b971ee4eedba08d80421bcfbdbfb2485dc2b9f (diff) |
Disallow using --track with --tac
Close #3234
-rw-r--r-- | CHANGELOG.md | 5 | ||||
-rw-r--r-- | man/man1/fzf.1 | 1 | ||||
-rw-r--r-- | src/options.go | 4 |
3 files changed, 10 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index e9b795da..4c16db6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ CHANGELOG ========= +0.39.1 +------ +- Disallow using `--track` with `--tac` as the result can be very confusing +- Bug fixes and improvements + 0.39.0 ------ - Added `one` event that is triggered when there's only one match diff --git a/man/man1/fzf.1 b/man/man1/fzf.1 index 4bb29bc4..d632a4ce 100644 --- a/man/man1/fzf.1 +++ b/man/man1/fzf.1 @@ -95,6 +95,7 @@ Do not sort the result .B "--track" Make fzf track the current selection when the result list is updated. This can be useful when browsing logs using fzf with sorting disabled. +This option is not compatible with \fB--tac\fR. .RS e.g. diff --git a/src/options.go b/src/options.go index 8703c0ec..071819d9 100644 --- a/src/options.go +++ b/src/options.go @@ -1938,6 +1938,10 @@ func postProcessOptions(opts *Options) { errorExit("scrollbar display width should be 1") } + if opts.Track && opts.Tac { + errorExit("--track cannot be used with --tac") + } + // Default actions for CTRL-N / CTRL-P when --history is set if opts.History != nil { if _, prs := opts.Keymap[tui.CtrlP.AsEvent()]; !prs { |