Commit Graph

1247 Commits

Author SHA1 Message Date
Junegunn Choi bd3e65df4d Trim unsupported OSC sequences (#4169)
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 #4169
2025-01-10 20:53:47 +09:00
Junegunn Choi d7b13f3408 Add a test case for the mixed delimiter ANSI sequence (#4169) 2025-01-10 20:31:51 +09:00
Junegunn Choi 14ef8e8051 Support ANSI sequences with mixed ; and : delimiters (#4169)
`make bench` shows no loss of performance.
2025-01-10 17:43:13 +09:00
Junegunn Choi 6783417504 Do not export $LINES and $COLUMNS for non-preview processes
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 #4164
2025-01-08 10:00:57 +09:00
Junegunn Choi fa3f706e71 Refactor option parser
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-07 19:16:41 +09:00
Junegunn Choi 9c2f6cae88 Fix adaptive height with --header-border 2025-01-07 19:16:16 +09:00
Junegunn Choi a30181e240 Update man page sections
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-07 00:20:36 +09:00
Junegunn Choi 88d768bf6b Restructure --help output 2025-01-06 23:34:14 +09:00
Junegunn Choi 6444cc7905 Render preview label if possible when --preview-border=line
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-06 10:09:59 +09:00
Junegunn Choi 328af1f397 Remove header indentation when unnecessary
# Indent the header to align with the entries in the list
  fzf --header 'Hello' --header-border --list-border

  # No extra indentation required
  fzf --header 'Hello' --header-border
2025-01-06 09:57:58 +09:00
Junegunn Choi 5ae60e2e80 Add style presets: --style=[default|minimal|full]
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 #4160
2025-01-06 02:10:44 +09:00
Junegunn Choi 0e0b868342 Add preview border style 'line'
It draws a single line between the preview window and the rest of the
interface. i.e. automatically choose between 'left', 'right', 'top', and
'bottom' depending on the position of the preview window.
2025-01-06 00:44:59 +09:00
Junegunn Choi a5beb08ed7 Border around the header section
Close #4159
2025-01-05 23:02:52 +09:00
phanium 93415493b4 fix: make header align with list (#4158)
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-05 01:13:23 +09:00
Junegunn Choi 8e4d338de9 Fix adaptive height in the presence of --list-border and --input-border
seq 10 | fzf --height=~100%
2025-01-04 19:19:18 +09:00
Junegunn Choi 8a71e091a8 Fix '--tmux border-native' 2025-01-04 18:47:00 +09:00
Andreas Auernhammer 120cd7f25a Add border-native option to --tmux flag (#4157)
This commit adds the `border-native` resulting in the following:

```
--tmux[=[center|top|bottom|left|right][,SIZE[%]][,SIZE[%]][,border-native]]
```

By default, when not specified, the `-B` flag is passed to the
`tmux popup-window` command such that no border is drawn around
the tmux popup window.

When the `border-native` option is present, the `-B` flag is omitted
and the popup window is drawn using the border style configured in
the tmux config file.

Fixes #4156

Signed-off-by: Andreas Auernhammer <github@aead.dev>
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2025-01-04 18:30:32 +09:00
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