Skip to content
Snippets Groups Projects
Unverified Commit b29375c8 authored by Junegunn Choi's avatar Junegunn Choi
Browse files

[vim] Minor refactoring

parent 76d3f6d2
No related branches found
No related tags found
No related merge requests found
...@@ -436,7 +436,7 @@ function! s:execute(dict, command, use_height, temps) abort ...@@ -436,7 +436,7 @@ function! s:execute(dict, command, use_height, temps) abort
if has('unix') && !a:use_height if has('unix') && !a:use_height
silent! !clear 2> /dev/null silent! !clear 2> /dev/null
endif endif
let escaped = escape(substitute(a:command, '\n', '\\n', 'g'), '%#') let escaped = escape(substitute(a:command, '\n', '\\n', 'g'), '%#!')
if has('gui_running') if has('gui_running')
let Launcher = get(a:dict, 'launcher', get(g:, 'Fzf_launcher', get(g:, 'fzf_launcher', s:launcher))) let Launcher = get(a:dict, 'launcher', get(g:, 'Fzf_launcher', get(g:, 'fzf_launcher', s:launcher)))
let fmt = type(Launcher) == 2 ? call(Launcher, []) : Launcher let fmt = type(Launcher) == 2 ? call(Launcher, []) : Launcher
...@@ -451,7 +451,7 @@ function! s:execute(dict, command, use_height, temps) abort ...@@ -451,7 +451,7 @@ function! s:execute(dict, command, use_height, temps) abort
let stdin = has_key(a:dict, 'source') ? '' : '< /dev/tty' let stdin = has_key(a:dict, 'source') ? '' : '< /dev/tty'
call system(printf('tput cup %d > /dev/tty; tput cnorm > /dev/tty; %s %s 2> /dev/tty', &lines, command, stdin)) call system(printf('tput cup %d > /dev/tty; tput cnorm > /dev/tty; %s %s 2> /dev/tty', &lines, command, stdin))
else else
execute 'silent !'.escape(command, '!') execute 'silent !'.command
endif endif
let exit_status = v:shell_error let exit_status = v:shell_error
redraw! redraw!
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment