From 7a4ad2ed9505bc34d70b7be04c67552dbc110072 Mon Sep 17 00:00:00 2001 From: Ryan Winograd Date: Wed, 29 Jul 2020 08:40:55 -0500 Subject: [PATCH] Fix :VimwikiNextTask Use the correct function for accessing 'rxListItemWithoutCB'. `ac4d0a1d46` refactored access to vars and it appears this is one place where `get_syntaxlocal` should have been renamed to `get_wikilocal` but was accidentally skipped. --- autoload/vimwiki/base.vim | 2 +- doc/vimwiki.txt | 2 ++ test/list_todo.vader | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/autoload/vimwiki/base.vim b/autoload/vimwiki/base.vim index c468f1e..013bfd8 100644 --- a/autoload/vimwiki/base.vim +++ b/autoload/vimwiki/base.vim @@ -1342,7 +1342,7 @@ endfunction " Find next task (Exported) function! vimwiki#base#find_next_task() abort - let taskRegex = vimwiki#vars#get_syntaxlocal('rxListItemWithoutCB') + let taskRegex = vimwiki#vars#get_wikilocal('rxListItemWithoutCB') \ . '\+\(\[ \]\s\+\)\zs' call vimwiki#base#search_word(taskRegex, '') endfunction diff --git a/doc/vimwiki.txt b/doc/vimwiki.txt index 6db5b9e..4267d14 100644 --- a/doc/vimwiki.txt +++ b/doc/vimwiki.txt @@ -3674,6 +3674,7 @@ Contributors and their Github usernames in roughly chronological order: - Edward Bassett (@ebassett) - Rafael Castillo (@eltrufas) - Reiner Herrmann (@reinerh) + - Ryan Winograd ============================================================================== @@ -3692,6 +3693,7 @@ New:~ * PR #900: conceallevel is now setted locally for vimwiki buffers * PR #901: adds multiparagraph blockquotes using email style syntax * PR #934: RSS feed generation for diary with :VimwikiRss. + * PR #959: Fix :VimwikiNextTask 2.5 (2020-05-26)~ diff --git a/test/list_todo.vader b/test/list_todo.vader index b996b79..211022b 100644 --- a/test/list_todo.vader +++ b/test/list_todo.vader @@ -199,6 +199,23 @@ Expect (4 items toogled): * [X] Chap2 End +################################################################################ +# Todo list with text above + +Given vimwiki (TODO list): + Some other text + + - [ ] Todo Item + +Execute (:VimwikiNextTask): + :execute "VimwikiNextTask" | execute 'normal yyp' + +Expect (Introduce new todo item): + Some other text + + - [ ] Todo Item + - [ ] Todo Item + ################################################################################ # Numbered Todo list