From 710372b8db7e65e5bf7ed04742785f11fe9e6e7a Mon Sep 17 00:00:00 2001 From: Wilhelm Schuermann Date: Mon, 4 May 2015 08:45:25 +0200 Subject: [PATCH] TW-1610: Disabling GC can lead to editing the wrong task - 9e6c6ecb93b65f5b13aba76f760e825fa9256f93 introduced a change that can lead to the wrong task being edited when GC is manually turned off. Fix this by taking the user's GC setting into account. --- ChangeLog | 1 + src/Context.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8209c43b3..719111861 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ again (thanks to Jens Erat). - TW-1605 Japanese translation for Taskwarrior (thanks to Oota Toshiya). - TW-1606 scheduled.any filter (thanks to Peter Rochen). +- TW-1610 Disabling GC can lead to editing the wrong task (thanks to Scott M). - The 'obfuscate' setting, if set to '1' will replace all text with 'xxx'. - POSIX file locking mechanism, eliminating platform-specific code. diff --git a/src/Context.cpp b/src/Context.cpp index bd1da239f..40af3db21 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -453,7 +453,7 @@ int Context::dispatch (std::string &out) // possible. if (c->displays_id () && !tdb2.read_only ()) { - run_gc = true; + run_gc = config.getBoolean ("gc"); tdb2.gc (); } else