diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2025-01-04 18:47:00 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2025-01-04 18:47:00 +0900 |
| commit | 8a71e091a81c5d46770a261f84f8d5674fe73e6e (patch) | |
| tree | c30816ae291640c4745b7278cdea9c7012e3f38c | |
| parent | 120cd7f25a8209297f15b0a79b36c44b30e641fb (diff) | |
| download | fzf-8a71e091a81c5d46770a261f84f8d5674fe73e6e.tar.gz | |
Fix '--tmux border-native'
| -rw-r--r-- | CHANGELOG.md | 6 | ||||
| -rw-r--r-- | src/options.go | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index c4904d21..481f3492 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,7 +29,11 @@ CHANGELOG - Actions - `change-input-label` - `transform-input-label` -- Added `--preview-border[=STYLE]` as short for `--preview-window=border-[STYLE]` +- Added `--preview-border[=STYLE]` as short for `--preview-window=border[-STYLE]` +- You can specify `border-native` to `--tmux` so that native tmux border is used instead of `--border`. This can be useful if you start a different program from inside the popup. + ```sh + fzf --tmux border-native --bind 'enter:execute:less {}' + ``` - Added `toggle-multi-line` action - Added `toggle-hscroll` action diff --git a/src/options.go b/src/options.go index a3096d11..b21396a5 100644 --- a/src/options.go +++ b/src/options.go @@ -331,7 +331,12 @@ func parseTmuxOptions(arg string, index int) (*tmuxOptions, error) { } // Defaults to 'center' - switch tokens[0] { + first := "center" + if len(tokens) > 0 { + first = tokens[0] + } + + switch first { case "top", "up": opts.position = posUp opts.width = sizeSpec{100, true} |
