From b6d320d3113c0da186cd99d5f6f095b1d1641bcf Mon Sep 17 00:00:00 2001 From: Federico Hernandez Date: Mon, 21 Jun 2010 22:56:05 +0200 Subject: [PATCH] Adjusted denotate - partly matched strings are now also detected in the middle of the annotation and not only from the beginning. --- doc/man/task.1 | 3 +-- src/command.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/man/task.1 b/doc/man/task.1 index f2d4003ea..ce014a109 100644 --- a/doc/man/task.1 +++ b/doc/man/task.1 @@ -37,8 +37,7 @@ Adds an annotation to an existing task. .B denotate ID description Deletes an annotation for the specified task. If the provided description matches an annotation exactly, the corresponding annotation is deleted. If the provided description -matches an annotation partly (from the beginning), the first partly matched annotation -is deleted. +matches annotations partly, the first partly matched annotation is deleted. .TP .B info ID diff --git a/src/command.cpp b/src/command.cpp index bba9e0761..b71ae225c 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -2082,7 +2082,7 @@ int handleDenotate (std::string &outs) anno = i->value (); std::string::size_type loc = find (anno, desc, sensitive); - if (loc != std::string::npos && loc == 0) + if (loc != std::string::npos) { match = true; annotations.erase (i);