mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
CmdStop: Removed quotes from all tags before attempting an Interval::unTag
This commit is contained in:
parent
2666da96c1
commit
8141d9d2fc
1 changed files with 4 additions and 4 deletions
|
@ -28,6 +28,7 @@
|
||||||
#include <commands.h>
|
#include <commands.h>
|
||||||
#include <timew.h>
|
#include <timew.h>
|
||||||
#include <Interval.h>
|
#include <Interval.h>
|
||||||
|
#include <Lexer.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -46,6 +47,8 @@ int CmdStop (
|
||||||
{
|
{
|
||||||
// Stop it.
|
// Stop it.
|
||||||
latest.end (Datetime ());
|
latest.end (Datetime ());
|
||||||
|
database.modifyInterval (latest);
|
||||||
|
log.write ("debug", std::string ("Stopped tracking: ") + latest.serialize ());
|
||||||
|
|
||||||
// User feedback.
|
// User feedback.
|
||||||
std::cout << intervalSummarize (rules, latest);
|
std::cout << intervalSummarize (rules, latest);
|
||||||
|
@ -55,10 +58,7 @@ int CmdStop (
|
||||||
auto words = cli.getWords ();
|
auto words = cli.getWords ();
|
||||||
if (words.size ())
|
if (words.size ())
|
||||||
for (auto& word : cli.getWords ())
|
for (auto& word : cli.getWords ())
|
||||||
latest.untag (word);
|
latest.untag (Lexer::dequote (word));
|
||||||
|
|
||||||
database.modifyInterval (latest);
|
|
||||||
log.write ("debug", std::string ("Stopped tracking: ") + latest.serialize ());
|
|
||||||
|
|
||||||
if (words.size () &&
|
if (words.size () &&
|
||||||
latest.tags ().size ())
|
latest.tags ().size ())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue