Skip to content

Commit 15d5d0e

Browse files
author
skywind3000
committed
add try/catch for Ex commands starting with colon
1 parent a64d799 commit 15d5d0e

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

plugin/asyncrun.vim

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" Maintainer: skywind3000 (at) gmail.com, 2016-2023
44
" Homepage: https://github.com/skywind3000/asyncrun.vim
55
"
6-
" Last Modified: 2023/09/19 23:48
6+
" Last Modified: 2023/09/20 09:47
77
"
88
" Run shell command in background and output to quickfix:
99
" :AsyncRun[!] [options] {cmd} ...
@@ -621,7 +621,14 @@ function! s:AsyncRun_Job_OnFinish()
621621
exec "norm! \<esc>"
622622
endif
623623
if s:async_info.post != ''
624-
exec s:async_info.post
624+
try
625+
exec s:async_info.post
626+
catch
627+
redraw
628+
echohl ErrorMsg
629+
echo 'AsyncRun: ' . v:exception
630+
echohl None
631+
endtry
625632
let s:async_info.post = ''
626633
endif
627634
if g:asyncrun_exit != ""
@@ -2274,7 +2281,7 @@ endfunc
22742281
" asyncrun - version
22752282
"----------------------------------------------------------------------
22762283
function! asyncrun#version()
2277-
return '2.11.22'
2284+
return '2.11.23'
22782285
endfunc
22792286

22802287

0 commit comments

Comments
 (0)