Fix #23
This commit is contained in:
@@ -70,7 +70,7 @@ function! todo#PrependDate()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! todo#ToggleMarkAsDone(status)
|
function! todo#ToggleMarkAsDone(status)
|
||||||
if (getline(".") =~ '\C^\s*x\s*\d\{4\}')
|
if (getline(".") =~ '\C^x\s*\d\{4\}')
|
||||||
:call todo#UnMarkAsDone(a:status)
|
:call todo#UnMarkAsDone(a:status)
|
||||||
else
|
else
|
||||||
:call todo#MarkAsDone(a:status)
|
:call todo#MarkAsDone(a:status)
|
||||||
@@ -83,7 +83,7 @@ function! todo#UnMarkAsDone(status)
|
|||||||
else
|
else
|
||||||
let pat=' '.a:status
|
let pat=' '.a:status
|
||||||
endif
|
endif
|
||||||
exec ':s/\C^\s*x\s*\d\{4}-\d\{1,2}-\d\{1,2}'.pat.'\s*//g'
|
exec ':s/\C^x\s*\d\{4}-\d\{1,2}-\d\{1,2}'.pat.'\s*//g'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! todo#MarkAsDone(status)
|
function! todo#MarkAsDone(status)
|
||||||
@@ -91,7 +91,11 @@ function! todo#MarkAsDone(status)
|
|||||||
exec 'normal! I'.a:status.' '
|
exec 'normal! I'.a:status.' '
|
||||||
endif
|
endif
|
||||||
call todo#PrependDate()
|
call todo#PrependDate()
|
||||||
normal! Ix
|
if (getline(".") =~ '^ ')
|
||||||
|
normal! gIx
|
||||||
|
else
|
||||||
|
normal! Ix
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! todo#MarkAllAsDone()
|
function! todo#MarkAllAsDone()
|
||||||
|
|||||||
@@ -480,7 +480,7 @@ Expect todo (Toggled tasks with today as **TODAY**):
|
|||||||
x (A) **TODAY** 2017-09-01 Active priority task with a created date
|
x (A) **TODAY** 2017-09-01 Active priority task with a created date
|
||||||
x **TODAY** X 2017-09-18 Not to be confused for a complete task
|
x **TODAY** X 2017-09-18 Not to be confused for a complete task
|
||||||
x **TODAY** XNot to be confused for a complete task
|
x **TODAY** XNot to be confused for a complete task
|
||||||
Rules are not clear on leading whitespace, see comments in test
|
x **TODAY** x 2017-09-18 Rules are not clear on leading whitespace, see comments in test
|
||||||
x **TODAY** Tricky incomplete task x 2017-09-18
|
x **TODAY** Tricky incomplete task x 2017-09-18
|
||||||
|
|
||||||
" function: todo#SortDue() {{{2
|
" function: todo#SortDue() {{{2
|
||||||
|
|||||||
Reference in New Issue
Block a user