From f95c318994a601fa3befa1b864a2d12ab92a03f5 Mon Sep 17 00:00:00 2001 From: Andreas Auernhammer Date: Fri, 3 Jan 2025 19:52:04 +0100 Subject: [PATCH] review: do not auto. set `--border` with native popup border Signed-off-by: Andreas Auernhammer --- src/options.go | 11 ++++------- src/tmux.go | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/options.go b/src/options.go index 09858cae1c1..edfee07f53d 100644 --- a/src/options.go +++ b/src/options.go @@ -310,8 +310,7 @@ func defaultTmuxOptions(index int) *tmuxOptions { position: posCenter, width: sizeSpec{50, true}, height: sizeSpec{50, true}, - index: index, - } + index: index} } func parseTmuxOptions(arg string, index int) (*tmuxOptions, error) { @@ -660,8 +659,7 @@ func defaultOptions() *Options { WalkerRoot: []string{"."}, WalkerSkip: []string{".git", "node_modules"}, Help: false, - Version: false, - } + Version: false} } func optString(arg string, prefixes ...string) (bool, string) { @@ -1736,7 +1734,7 @@ func strLines(str string) []string { } func parseSize(str string, maxPercent float64, label string) (sizeSpec, error) { - spec := sizeSpec{} + var spec = sizeSpec{} var val float64 var err error percent := strings.HasSuffix(str, "%") @@ -1822,8 +1820,7 @@ func parseInfoStyle(str string) (infoStyle, string, error) { } for _, spec := range []infoSpec{ {"inline", infoInline}, - {"inline-right", infoInlineRight}, - } { + {"inline-right", infoInlineRight}} { if strings.HasPrefix(str, spec.name+":") { return spec.style, strings.ReplaceAll(str[len(spec.name)+1:], "\n", " "), nil } diff --git a/src/tmux.go b/src/tmux.go index d8e268d2da1..ff24e81eb0e 100644 --- a/src/tmux.go +++ b/src/tmux.go @@ -11,7 +11,7 @@ func runTmux(args []string, opts *Options) (int, error) { // Prepare arguments fzf := args[0] args = append([]string{"--bind=ctrl-z:ignore"}, args[1:]...) - if opts.BorderShape == tui.BorderUndefined { + if opts.BorderShape == tui.BorderUndefined && !opts.Tmux.border { args = append(args, "--border") } argStr := escapeSingleQuote(fzf)