Skip to content
Myr

[vim] Display proper error message when GVim launcher failed

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 98d2bfa · Browse files · 1 file+2 added−2 removed
This commit

State

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

Trailers

  • Related: https://github.com/junegunn/fzf.vim/issues/16

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:plugin/fzf.vim+2 added-2 removed
211 unmodified lines
212213function! s:xterm_launcher()214 let fmt = 'xterm -T "[fzf]" -bg "\%s" -fg "\%s" -geometry %dx%d+%d+%d -e bash -ic %%s'215 if has('gui_macvim')216 let fmt .= '; osascript -e "tell application \"MacVim\" to activate"'216 let fmt .= '&& osascript -e "tell application \"MacVim\" to activate"'217 endif218 return printf(fmt,219 \ synIDattr(hlID("Normal"), "bg"), synIDattr(hlID("Normal"), "fg"),220 \ &columns, &lines/2, getwinposx(), getwinposy())
15 unmodified lines
236 execute 'silent !'.command237 redraw!238 if v:shell_error239 " Do not print error message on exit status 1 (no match) or 130 (interrupt)240 if v:shell_error == 2240 if index([1, 130], v:shell_error) < 0241 call s:error('Error running ' . command)242 endif243 return []244 else
193 unmodified lines