summaryrefslogtreecommitdiff
path: root/plugin/fzf.vim
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2014-03-31 13:48:53 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2014-03-31 13:48:53 +0900
commitaf616457e34d634d8e93c316cd3f675abce7a47e (patch)
tree0cfe90148e467b307f00f928806cd18a39c4be1c /plugin/fzf.vim
parent1a100a2919711edc2a729501c985e85b6ccccf27 (diff)
downloadfzf-af616457e34d634d8e93c316cd3f675abce7a47e.tar.gz
Use -p option of split-window instead of manual calculation
Diffstat (limited to 'plugin/fzf.vim')
-rw-r--r--plugin/fzf.vim12
1 files changed, 4 insertions, 8 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index c75e9af2..faf8e57a 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -115,20 +115,16 @@ function! s:execute_tmux(dict, command, temps)
let command = a:command
endif
- if type(a:dict.tmux) == 1
- if a:dict.tmux =~ '%$'
- let height = &lines * str2nr(a:dict.tmux[0:-2]) / 100
- else
- let height = str2nr(a:dict.tmux)
- endif
+ if type(a:dict.tmux) == 1 && a:dict.tmux =~ '%$'
+ let height = '-p '.a:dict.tmux[0:-2]
else
- let height = a:dict.tmux
+ let height = '-l '.a:dict.tmux
endif
let s:pane = substitute(
\ system(
\ printf(
- \ 'tmux split-window -l %d -P -F "#{pane_id}" %s',
+ \ 'tmux split-window %s -P -F "#{pane_id}" %s',
\ height, s:shellesc(command))), '\n', '', 'g')
let s:dict = a:dict
let s:temps = a:temps