Fix generation of [Dd]one-[Td]oday.txt files

This commit is contained in:
Manu Hernandez
2020-03-12 10:25:23 +00:00
committed by David Beniamine
parent 11811d90a7
commit 5585652ca6

View File

@@ -144,7 +144,13 @@ function! todo#RemoveCompleted()
if exists("g:TodoTxtForceDoneName") if exists("g:TodoTxtForceDoneName")
let l:done=g:TodoTxtForceDoneName let l:done=g:TodoTxtForceDoneName
else else
let l:done=substitute(substitute(expand('%:t'),'todo','done',''),'Todo','Done','') let l:currentfile=expand('%:t')
if l:currentfile =~ '[Tt]oday.txt'
let l:done=substitute(substitute(l:currentfile,'today','done-today',''),'Today','Done-Today','')
else
let l:done=substitute(substitute(l:currentfile,'todo','done',''),'Todo','Done','')
endif
endif endif
let l:done_file = l:target_dir.'/'.l:done let l:done_file = l:target_dir.'/'.l:done
echo "Writing to ".l:done_file echo "Writing to ".l:done_file