Skip to content

Commit 2a6aad6

Browse files
committed
Eliminate use of feedkeys()
1 parent e292d2c commit 2a6aad6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

autoload/dispatch.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ function! dispatch#compile_command(bang, args, count) abort
464464
let &errorfile = request.file
465465

466466
let modelines = &modelines
467+
let after = ''
467468
try
468469
let &modelines = 0
469470
silent doautocmd QuickFixCmdPre dispatch-make
@@ -474,13 +475,16 @@ function! dispatch#compile_command(bang, args, count) abort
474475
let s:files[request.file] = request
475476

476477
if !s:dispatch(request)
478+
let after = 'call dispatch#complete('.request.id.')'
479+
redraw!
477480
execute 'silent !'.request.command dispatch#shellpipe(request.file)
478-
call feedkeys(":redraw!|call dispatch#complete(".request.id.")\r", 'n')
481+
redraw!
479482
endif
480483
finally
481484
silent doautocmd QuickFixCmdPost dispatch-make
482485
let &modelines = modelines
483486
endtry
487+
execute after
484488
return ''
485489
endfunction
486490

0 commit comments

Comments
 (0)