diff options
| author | Teddy Wing | 2020-03-21 19:44:44 +0100 | 
|---|---|---|
| committer | Teddy Wing | 2020-03-21 19:44:44 +0100 | 
| commit | 0fa59c30f1a6f5e1a9796e5df53c7cd955994509 (patch) | |
| tree | cbc4f26aa89a60b40b6fa0eec7c8cc81ca47a430 /autoload | |
| parent | 953c0b15706cb7f8cded7d6792e5031e2a78228f (diff) | |
| download | vim-twodo-0fa59c30f1a6f5e1a9796e5df53c7cd955994509.tar.bz2 | |
Support counts in both `NextIncomplete()` and `PreviousIncomplete()`
Diffstat (limited to 'autoload')
| -rw-r--r-- | autoload/todo/motion.vim | 12 | 
1 files changed, 8 insertions, 4 deletions
| diff --git a/autoload/todo/motion.vim b/autoload/todo/motion.vim index 96877a9..27d6264 100644 --- a/autoload/todo/motion.vim +++ b/autoload/todo/motion.vim @@ -1,20 +1,24 @@  let s:INCOMPLETE_MATCHER = '^\s*[\-_!] ' -function! todo#motion#NextIncomplete() +function! s:Incomplete(search_flags)  	let cnt = v:count1  	normal! m'  	let i = 0  	while i < cnt -		call search(s:INCOMPLETE_MATCHER) +		call search(s:INCOMPLETE_MATCHER, a:search_flags)  		let i += 1  	endwhile  endfunction +function! todo#motion#NextIncomplete() +	call s:Incomplete('') +endfunction + +  function! todo#motion#PreviousIncomplete() -	normal! m' -	call search(s:INCOMPLETE_MATCHER, 'b') +	call s:Incomplete('b')  endfunction | 
