Correct a bug in todo#Complete
where the entire lines were being shown as related
This commit is contained in:
@@ -11,6 +11,7 @@ set rtp+=~/.vim/bundle/vader.vim
|
||||
set rtp+=./
|
||||
filetype plugin indent on
|
||||
syntax enable
|
||||
autocmd filetype todo setlocal omnifunc=todo#Complete
|
||||
EOF
|
||||
) tests/todo.txt
|
||||
) $*
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ set rtp+=~/.vim/bundle/vader.vim
|
||||
set rtp+=./
|
||||
filetype plugin indent on
|
||||
syntax enable
|
||||
autocmd filetype todo setlocal omnifunc=todo#Complete
|
||||
EOF
|
||||
) +Vader! tests/*.vader && echo Success || exit 1
|
||||
|
||||
@@ -24,6 +25,7 @@ set rtp+=~/.vim/bundle/vader.vim
|
||||
set rtp+=./
|
||||
filetype plugin indent on
|
||||
syntax enable
|
||||
autocmd filetype todo setlocal omnifunc=todo#Complete
|
||||
set ignorecase
|
||||
EOF
|
||||
) +Vader! tests/*.vader && echo Success || exit 1
|
||||
@@ -37,6 +39,7 @@ set rtp+=~/.vim/bundle/vader.vim
|
||||
set rtp+=./
|
||||
filetype plugin indent on
|
||||
syntax enable
|
||||
autocmd filetype todo setlocal omnifunc=todo#Complete
|
||||
set iskeyword+=-
|
||||
EOF
|
||||
) +Vader! tests/*.vader && echo Success || exit 1
|
||||
|
||||
@@ -760,6 +760,33 @@ Then (Is cursor on first non-overdue task?):
|
||||
After:
|
||||
unlet g:TodoTxtSortDueDateCursorPos
|
||||
|
||||
" function todo#Complete(findstart, base) {{{2
|
||||
Given todo (Tasks):
|
||||
2017-09-23 Test task +SecretProject @Work due:2017-09-26
|
||||
Tricky lowercase @wrongCaseSelected +selectedWrongCase
|
||||
Project without a context +SecretProject
|
||||
Do (Complete context W):
|
||||
Go@W\<C-X>\<C-O>
|
||||
Expect todo (Context Work):
|
||||
2017-09-23 Test task +SecretProject @Work due:2017-09-26
|
||||
Tricky lowercase @wrongCaseSelected +selectedWrongCase
|
||||
Project without a context +SecretProject
|
||||
@Work
|
||||
Do (Complete project S):
|
||||
Go+S\<C-X>\<C-O>
|
||||
Expect todo (Project SecretProject):
|
||||
2017-09-23 Test task +SecretProject @Work due:2017-09-26
|
||||
Tricky lowercase @wrongCaseSelected +selectedWrongCase
|
||||
Project without a context +SecretProject
|
||||
+SecretProject
|
||||
Execute (Complete project and switch to preview):
|
||||
:execute "normal Go+\<C-X>\<C-O>\<ESC>"
|
||||
:blast!
|
||||
Expect (Project SecretProject):
|
||||
Contexts: @Context
|
||||
Buffers: tests/todo.vader
|
||||
|
||||
|
||||
" file: ftplugin/todo.vim {{{1
|
||||
|
||||
" function: TodoFoldLevel(lnum) {{{2
|
||||
|
||||
Reference in New Issue
Block a user