summaryrefslogtreecommitdiffstats
path: root/plugin
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2015-09-26 21:04:44 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2015-09-26 21:04:44 +0900
commit86306dd45a71df4c5651b7895da4b31d49183ed6 (patch)
tree70428eaa69d65695d6368fd71984d305afbfdda7 /plugin
parent98d2bfa0db3cd605f05b518338d95d4227dabb75 (diff)
[vim] Display proper error message when GVim launcher failed
Related: https://github.com/junegunn/fzf.vim/issues/16
Diffstat (limited to 'plugin')
-rw-r--r--plugin/fzf.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index 117e03f6..0cb444f8 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -213,7 +213,7 @@ endfunction
function! s:xterm_launcher()
let fmt = 'xterm -T "[fzf]" -bg "\%s" -fg "\%s" -geometry %dx%d+%d+%d -e bash -ic %%s'
if has('gui_macvim')
- let fmt .= '; osascript -e "tell application \"MacVim\" to activate"'
+ let fmt .= '&& osascript -e "tell application \"MacVim\" to activate"'
endif
return printf(fmt,
\ synIDattr(hlID("Normal"), "bg"), synIDattr(hlID("Normal"), "fg"),
@@ -237,7 +237,7 @@ function! s:execute(dict, command, temps)
redraw!
if v:shell_error
" Do not print error message on exit status 1 (no match) or 130 (interrupt)
- if v:shell_error == 2
+ if index([1, 130], v:shell_error) < 0
call s:error('Error running ' . command)
endif
return []