Fix '--tmux border-native'

This commit is contained in:
Junegunn Choi 2025-01-04 18:47:00 +09:00
parent 120cd7f25a
commit 8a71e091a8
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627
2 changed files with 11 additions and 2 deletions

View File

@ -29,7 +29,11 @@ CHANGELOG
- Actions - Actions
- `change-input-label` - `change-input-label`
- `transform-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-multi-line` action
- Added `toggle-hscroll` action - Added `toggle-hscroll` action

View File

@ -331,7 +331,12 @@ func parseTmuxOptions(arg string, index int) (*tmuxOptions, error) {
} }
// Defaults to 'center' // Defaults to 'center'
switch tokens[0] { first := "center"
if len(tokens) > 0 {
first = tokens[0]
}
switch first {
case "top", "up": case "top", "up":
opts.position = posUp opts.position = posUp
opts.width = sizeSpec{100, true} opts.width = sizeSpec{100, true}