Skip to content

Commit

Permalink
Put 1-column margin on the sides when native border is used
Browse files Browse the repository at this point in the history
For more consistent look
  • Loading branch information
junegunn committed Jan 4, 2025
1 parent f95c318 commit cbc9a92
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/tmux.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ import (

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 && !opts.Tmux.border {
fzf, rest := args[0], args[1:]
args = []string{"--bind=ctrl-z:ignore"}
if !opts.Tmux.border && opts.BorderShape == tui.BorderUndefined {
args = append(args, "--border")
}
if opts.Tmux.border && opts.Margin == defaultMargin() {
args = append(args, "--margin=0,1")
}
argStr := escapeSingleQuote(fzf)
for _, arg := range args {
for _, arg := range append(args, rest...) {
argStr += " " + escapeSingleQuote(arg)
}
argStr += ` --no-tmux --no-height`
Expand Down

0 comments on commit cbc9a92

Please sign in to comment.