Skip to content

Commit

Permalink
use $(?ask:default) to provide a default value, $(?ask:) to remember …
Browse files Browse the repository at this point in the history
…the history
  • Loading branch information
skywind3000 committed Mar 24, 2020
1 parent efd1293 commit a13a4f3
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 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/22 16:44
" Verision: 1.7.3
" Last Modified: 2020/03/24 18:20
" Verision: 1.7.4
"
" for more information, please visit:
" https://github.com/skywind3000/asynctasks.vim
Expand Down Expand Up @@ -770,11 +770,20 @@ function! s:command_input(command, taskname, remember)
if p2 < 0
break
endif
let remember = a:remember
let name = strpart(command, p1 + size_open, p2 - p1 - size_open)
let mark = mark_open . name . mark_close
let text = ''
let kiss = stridx(name, ':')
if kiss >= 0
let text = s:strip(strpart(name, kiss + 1))
let name = s:strip(strpart(name, 0, kiss))
if text == ''
let remember = 1
endif
endif
let rkey = a:taskname . ':' . name
if a:remember
if remember && text == ''
let text = get(g:asynctasks_history, rkey, '')
" echom 'remember: <' . text . '>'
endif
Expand Down

0 comments on commit a13a4f3

Please sign in to comment.