From 6fd2a7ccac99291658cd88bd58fd04fbcf3cf598 Mon Sep 17 00:00:00 2001 From: Isti Date: Mon, 12 Dec 2022 18:15:50 +0100 Subject: [PATCH] Fix done.txt naming bugs Two unreported done.txt naming bugs fixed: 1. *.Todo.txt files would use *.done.txt for the done filename 2. When a user had the ignorecase option set, the done.txt file was always named Done.txt, because the == operator ignores the case when this option is set. The bugs were introduced in PR #73 --- autoload/todo/txt.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/todo/txt.vim b/autoload/todo/txt.vim index 18bc7fe..8e7c04b 100644 --- a/autoload/todo/txt.vim +++ b/autoload/todo/txt.vim @@ -71,7 +71,7 @@ function! todo#txt#remove_completed() " Check for user-defined g:todo_done_filename if exists("g:todo_done_filename") let l:todo_done_filename = g:todo_done_filename - elseif expand('%:t') == 'Todo.txt' + elseif expand('%:t') =~# '.Todo.txt' let l:todo_done_filename = 'Done.txt' else let l:todo_done_filename = 'done.txt'