Commit Graph

1180 Commits

Author SHA1 Message Date
Junegunn Choi fb3bf6c984 Fix cursor placement of tcell renderer
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
Generate Sponsors README / deploy (push) Has been cancelled
2025-01-03 19:56:07 +09:00
Junegunn Choi c2e1861747 Update --help output
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
2025-01-02 23:54:59 +09:00
Junegunn Choi 543d41f3dd Do not try to print anything is screen height is zero 2025-01-02 23:44:47 +09:00
Junegunn Choi ee3916be17 Border around the input section (prompt + info)
Close #4154
2025-01-02 16:25:00 +09:00
Junegunn Choi fd513f8af8 Add missing --list-border=* parser
CodeQL / Analyze (go) (push) Has been cancelled
Test fzf on Linux / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Patch suggested by @bitraid
2024-12-31 19:39:46 +09:00
Junegunn Choi 9a2b7f559c Add --list-border for additional border around the list section
Close #4148
2024-12-31 17:05:14 +09:00
Junegunn Choi ca5e633399 Add toggle-hscroll
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
2024-12-19 21:05:26 +09:00
Junegunn Choi e60a9a628b Add toggle-multi-line action 2024-12-19 21:05:26 +09:00
Junegunn Choi 789226ff6d Fix test failure
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
Generate Sponsors README / deploy (push) Has been cancelled
cdcab26 removed excessive clearing of the windows. But it caused the
problem where the right side of the preview window border was not
cleared when hiding the preview window with the scrollbar disabled.
2024-12-14 22:42:40 +09:00
Junegunn Choi 805efc5bf1 Remove unused interface 2024-12-14 22:31:39 +09:00
Junegunn Choi cdcab26766 Fix redundant clearing of the windows with non-default bg color 2024-12-14 22:06:14 +09:00
Junegunn Choi d30e37434e Less flickering of the candidate list when resizing the preview window 2024-12-12 13:53:08 +09:00
Junegunn Choi 20d5b2e20e Avoid redrawing the windows on the first click on the border 2024-12-12 13:53:08 +09:00
Junegunn Choi 6c6be4ab1a Simplify resize code 2024-12-12 13:53:08 +09:00
Junegunn Choi d004eb1f7c Redraw preview scrollbar when window width changes 2024-12-12 13:53:08 +09:00
Junegunn Choi 3148b0f3e8 Restore previous behavior 2024-12-12 13:53:08 +09:00
Junegunn Choi 3fc0bd26a5 Disallow dragging the wrong sides of the border 2024-12-12 13:53:08 +09:00
Junegunn Choi 6c9025ff17 Update comments 2024-12-12 13:53:08 +09:00
Junegunn Choi 289997e373 Refactor 2024-12-12 13:53:08 +09:00
Junegunn Choi da9179335c Respect the properties of the currently active preview window options 2024-12-12 13:53:08 +09:00
Julian Prein cdf641fa3e Use Has{Top,Right,Bottom,Left}() where possible
De-duplicate code and reduce the amount of code that has to be changed
when new BorderShapes are being added. This also adds and uses the
missing HasBottom().
2024-12-12 13:53:08 +09:00
Julian Prein 66dbee10f5 Fix minimum preview width without left/right borders
When the chosen preview border shape has no left and/or right border,
the minimum total preview window size decreases. But due to the
hardcoded value for the minimum size of the preview window the size
could not be decreased further than 5.
2024-12-12 13:53:08 +09:00
Julian Prein 19e9b620ba Fix maximum preview height without horizontal separator
The minimum window height decreases when no extra line for the
horizontal separator is used (e.g. with `--info=inline --no-separator`).
In this case the preview window should be able to occupy this extra
line.
2024-12-12 13:53:08 +09:00
Julian Prein e4e4700aff Make the preview window resizable by mouse drag
Enable resizing the preview window by dragging its border with the
mouse. This works with all border styles except for `none`.
Counter-intuitively, having the border only on the opposite side of the
window works too - dragging from it will first decrease the preview size
to its minimum.
2024-12-12 13:53:08 +09:00
Junegunn Choi e182d3db7a Fix line wrap toggle when switching between screens
Fix #4099
2024-12-02 22:25:23 +09:00
Junegunn Choi 3b0c86e401 Much faster image processing
CodeQL / Analyze (go) (push) Has been cancelled
Test fzf on Linux / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Generate Sponsors README / deploy (push) Has been cancelled
Fix #3984
2024-11-29 00:26:12 +09:00
Junegunn Choi 7d9548919e Extend --walker-skip to support multi-component patterns
CodeQL / Analyze (go) (push) Has been cancelled
Test fzf on Linux / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
fzf --walker-skip 'foo/bar'

Close #4107
2024-11-26 17:26:16 +09:00
msabathier bee80a730f Allow walking multiple root directories (#4109)
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
Co-authored-by: Martin Sabathier <martin.sabathier.ext@corys.fr>
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2024-11-25 19:25:30 +09:00
Junegunn Choi ac3e24c99c Export FZF_PREVIEW_* variables to other processes as well
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
Close #4098
2024-11-24 18:49:10 +09:00
Junegunn Choi 3ec035c68b Fix incorrect overflow detection when --wrap is set
Fix #4083
2024-11-12 00:33:07 +09:00
Junegunn Choi ca3f6181d7 page-up/down: undo last up/down if items are skipped
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
Generate Sponsors README / deploy (push) Has been cancelled
Fix #4069
2024-11-09 11:54:41 +09:00
Junegunn Choi 9c94f9c3d0 Another attempt to fix (half-)page-up/down for multi-line items
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
Fix #4069
2024-11-08 20:18:42 +09:00
Junegunn Choi 4a85843bcf Fix (half-)page-up/down in the presence of multi-line items
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
Fix #4069
2024-11-07 22:21:07 +09:00
jaydee-coder d4d9b99879 Allow specifying '{n}' as the OFFSET in the preview-window flag (#4079)
CodeQL / Analyze (go) (push) Has been cancelled
Test fzf on Linux / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
* fzf: Allow '{n}' to be used as the OFFSET in the preview-window flag

* man: Document using '{n}' as the OFFSET in the preview-window flag
2024-11-04 22:27:59 +09:00
Junegunn Choi acdf265d7a Fix reader regression (#4070)
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
2024-11-03 20:32:26 +09:00
Junegunn Choi 19495eb9bb Remove possible races (#4070)
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
2024-11-03 20:12:47 +09:00
Junegunn Choi bacc8609ee Fix characters from previous preview not being cleared
Fix #4075
2024-11-03 15:07:17 +09:00
Junegunn Choi dcb4c3d84a Fix race in reload action
Fix #4070
2024-10-31 19:40:40 +09:00
Junegunn Choi 82ebcd9209 Fix (half-)page-up/down in the presence of multi-line items
CodeQL / Analyze (go) (push) Has been cancelled
Test fzf on Linux / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Fix #4069
2024-10-30 16:52:42 +09:00
Junegunn Choi d65c6101a8 walker: Do not treat '..' as a hidden entry
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
Thanks to @LangLangBart for the suggested fix

Fix #4048
2024-10-25 13:50:58 +09:00
Junegunn Choi 90a8800bb5 Avoid selecting an outdated merger from cache
CodeQL / Analyze (go) (push) Has been cancelled
Test fzf on Linux / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Generate Sponsors README / deploy (push) Has been cancelled
We cache a merger for partial input as well, because it is automatically
invalidated as soon as the new data comes in.

However, there was a race condition where a cached merger for a partial
input is used even after the input stream was complete. This commit
fixes the problem.

Fix #4034
2024-10-16 00:45:12 +09:00
Junegunn Choi a24eb99679 Fix full line background in preview window 2024-10-15 17:35:11 +09:00
Junegunn Choi 1a32220ca9 Add --gap option to put empty lines between items 2024-10-01 19:15:17 +09:00
Junegunn Choi 4161403a1d --tmux: Export bash functions
CodeQL / Analyze (go) (push) Has been cancelled
Test fzf on Linux / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Fix #4001
2024-09-29 19:33:42 +09:00
Junegunn Choi 2191a44e36 Redraw/hide scroll offset when 'info' property is changed
CodeQL / Analyze (go) (push) Has been cancelled
Test fzf on Linux / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Generate Sponsors README / deploy (push) Has been cancelled
2024-09-12 22:04:19 +09:00
Junegunn Choi 952276dc2d Add 'noinfo' option to hide scroll offset information in preview window
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
fzf --preview 'seq 1000' --preview-window noinfo

Close #2525
2024-09-12 18:31:14 +09:00
Junegunn Choi 4ae3069c6f Underscore boundaries should be ranked lower 2024-08-29 17:08:23 +09:00
Junegunn Choi efbcd5a683 Require quotes on both sides for boundary matching even in --exact mode
Only requiring '-suffix in --exact mode is confusing and not
straightforward. Requiring '-prefix in --exact mode means that
the users can experience unintended mode switches while typing.

e.g.
     'it   -> fuzzy (many results)
     'it'  -> boundary (few results)
     'it's -> fuzzy (many results)

However, user who intends to input a boundary query should not be
interested in the intermediate results, and the number of matches
decreases as she types, so it should be okay.

On the other hand, user who does intend to type "it's" will be surprised
by the sudden decrease of the match count, but eventually get the right
result.
2024-08-29 17:08:23 +09:00
Junegunn Choi 6a67712944 Implement exact-boundary match type
Close #3963
2024-08-29 17:08:23 +09:00
Junegunn Choi 0eee95af57 Fix CTRL-Z handling
Fix #3802

This fixes `xterm -e fzf` hangs on CTRL-Z

* Replace SIGSTOP with SIGTSTP
* Do not rely on SIGCONT
2024-08-29 16:41:52 +09:00