Skip to content

Commit 8d92822

Browse files
author
skywind3000
committed
update 2.10.0
1 parent 7ee75ae commit 8d92822

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

plugin/asyncrun.vim

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" Maintainer: skywind3000 (at) gmail.com, 2016-2022
44
" Homepage: https://github.com/skywind3000/asyncrun.vim
55
"
6-
" Last Modified: 2022/09/23 13:53
6+
" Last Modified: 2022/10/06 04:40
77
"
88
" Run shell command in background and output to quickfix:
99
" :AsyncRun[!] [options] {cmd} ...
@@ -1062,8 +1062,16 @@ function! asyncrun#fullname(f)
10621062
endif
10631063
if f == '%'
10641064
let f = expand('%')
1065-
if &bt == 'terminal' || &bt == 'nofile'
1065+
if &bt == 'terminal'
10661066
let f = ''
1067+
elseif &bt == 'nofile'
1068+
let is_directory = 0
1069+
if f =~ '[\/\\]$'
1070+
if f =~ '^[\/\\]' || f =~ '^.:[\/\\]'
1071+
let is_directory = isdirectory(f)
1072+
endif
1073+
endif
1074+
let f = (is_directory)? f : ''
10671075
endif
10681076
elseif f =~ '^\~[\/\\]'
10691077
let f = expand(f)
@@ -2075,7 +2083,7 @@ endfunc
20752083
" asyncrun - version
20762084
"----------------------------------------------------------------------
20772085
function! asyncrun#version()
2078-
return '2.9.15'
2086+
return '2.10.0'
20792087
endfunc
20802088

20812089

0 commit comments

Comments
 (0)