Skip to content
Myr

[vim] Native --tmux fix for Neovim

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 32eb32e · Browse files · 3 files+10 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+10 added−3 removed

  • other:+10 added−3 removed

3 files+10 added−3 removed

modified:plugin/fzf.vim+1 added-1 removed
590 unmodified lines
591 \ &lines, &columns, fzf#shellescape(s:fzf_tmux), size, (has_key(a:dict, 'source') ? '' : '-'))592 end593594 " Using native --tmux option595 let in = (has_key(a:dict, 'source') ? '' : ' < /dev/tty')595 let in = (has_key(a:dict, 'source') ? '' : ' --force-tty-in')596 return printf('%s --tmux %s%s', fzf#shellescape(fzf#exec()), size, in)597endfunction598599function! s:splittable(dict)
503 unmodified lines
modified:src/options.go+7 added
394 unmodified lines
395 Input chan string396 Output chan string397 NoWinpty bool398 Tmux *tmuxOptions399 ForceTtyIn bool400 ProxyScript string401 Bash bool402 Zsh bool403 Fish bool
1545 unmodified lines
1949 return err1950 }1951 case "--no-tmux":1952 opts.Tmux = nil1953 case "--force-tty-in":1954 // NOTE: We need this because `system('fzf --tmux < /dev/tty')` doesn't1955 // work on Neovim. Same as '-' option of fzf-tmux.1956 opts.ForceTtyIn = true1957 case "--no-force-tty-in":1958 opts.ForceTtyIn = false1959 case "--proxy-script":1960 if opts.ProxyScript, err = nextString(allArgs, &i, ""); err != nil {1961 return err1962 }
931 unmodified lines
modified:src/proxy.go+2 added-2 removed
57 unmodified lines
58 })59 }()6061 var command string62 commandPrefix += ` --proxy-script "$0"`63 if opts.Input == nil && util.IsTty(os.Stdin) {62 commandPrefix += ` --no-force-tty-in --proxy-script "$0"`63 if opts.Input == nil && (opts.ForceTtyIn || util.IsTty(os.Stdin)) {64 command = fmt.Sprintf(`%s > %q`, commandPrefix, output)65 } else {66 input, err := fifo("proxy-input")67 if err != nil {
78 unmodified lines