The native border is the handle for moving and resizing the pane with
the mouse, so use it by default, consistent with tmux. fzf draws its
own border only when a border style is explicitly specified with
--border. Extract the shared native-border decision into a helper.
The pane sets the options itself before running fzf, so that they are
in place no matter how quickly the command exits, targeted at
$TMUX_PANE; the default target would resolve to the active pane of
the session's current window.
- pane-border-format is set to '#{pane_title}' so that the label is
displayed on the border when pane-border-status is enabled;
pane-border-status itself is a window option in released tmux
versions and is left alone
- When a border style is explicitly specified with --border, a popup
is used instead of a floating pane so that the fzf-drawn border is
the only border shown; give 'border-native' to force a floating pane
- 'none' and 'line' are treated as no border; fzf draws no box for
either, so the label is displayed on the native border
- Remove 'border-fzf' which is now redundant; it was never released
- The title is escaped for select-pane -T which expands format
expressions; a lone ';' is escaped as tmux would treat it as a
command separator
- The label is skipped when ANSI stripping leaves an empty string
- --border-label-pos is ignored
- Fix remain-on-exit set on the original pane instead of the floating
pane
Unlike a popup, a floating pane is not modal; you can switch to other
panes and windows while fzf is running, move and resize the pane with
the mouse, zoom it to fullscreen, and use copy-mode in it.
- Floating pane always has a native border, so 'border-native' is
implied; give new 'border-fzf' option to fall back to a popup where
fzf draws its own border
- Popup is also used on tmux versions below 3.7, or when the window is
too small to fit a floating pane
- new-pane does not block until the command finishes and does not
propagate the exit status; block on a wait-for channel signaled by
the pane and pass the exit status through a temporary file
- Watchdog process signals the channel when the pane is closed
abnormally (e.g. kill-pane)
- Kill the pane when the proxy process is interrupted, like a popup
dying with its client
- Unzoom the window before creating the floating pane; doing so over a
zoomed window crashes the tmux server on 3.7b, and newer versions of
tmux unzoom the window anyway
- Floating pane size excludes the border and the position is that of
the content area; treat the requested size as the total footprint
including the border for consistency with popups
- Close the pane on exit even when remain-on-exit is on
- Pre-create the exit status file with O_EXCL to prevent tampering on
a shared TMPDIR