Skip to content

Commit

Permalink
1.6.4: set g:asynctasks_confirm to zero to skip file name confirm i…
Browse files Browse the repository at this point in the history
…n `:AsyncTaskEdit`.
  • Loading branch information
skywind3000 committed Mar 6, 2020
1 parent 98aee1e commit 97b55f5
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions plugin/asynctasks.vim
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"
" Maintainer: skywind3000 (at) gmail.com, 2020
"
" Last Modified: 2020/03/03 12:42
" Verision: 1.6.3
" Last Modified: 2020/03/07 06:14
" Verision: 1.6.4
"
" for more information, please visit:
" https://github.com/skywind3000/asynctasks.vim
Expand Down Expand Up @@ -53,6 +53,9 @@ let g:asynctasks_environ = get(g:, 'asynctasks_environ', {})
" features
let g:asynctasks_feature = get(g:, 'asynctasks_feature', {})

" confirm file name in :AsyncEdit ?
let g:asynctasks_confirm = get(g:, 'asynctasks_confirm', 1)

" terminal mode: tab/curwin/top/bottom/left/right/quickfix/external
let g:asynctasks_term_pos = get(g:, 'asynctasks_term_pos', 'quickfix')

Expand Down Expand Up @@ -1193,13 +1196,15 @@ function! s:task_edit(mode, path)
endif
endif
let name = fnamemodify(expand(name), ':p')
call inputsave()
let r = input('(Edit task config): ', name)
call inputrestore()
if r == ''
return -1
if g:asynctasks_confirm
call inputsave()
let r = input('(Edit task config): ', name)
call inputrestore()
if r == ''
return -1
endif
let name = r
endif
let name = r
let newfile = filereadable(name)? 0 : 1
let filedir = fnamemodify(name, ':p:h')
if isdirectory(filedir) == 0 && filedir != ''
Expand Down

0 comments on commit 97b55f5

Please sign in to comment.