mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Bug Fix - undo
- Fixed bug that didn't properly pop_back off the undo stack. - Fixed bug that caused an attempt to call taskDifferences when one of the tasks was "".
This commit is contained in:
parent
0891d3ea63
commit
569d31da7a
3 changed files with 35 additions and 12 deletions
11
src/util.cpp
11
src/util.cpp
|
@ -427,13 +427,22 @@ void spit (const std::string& file, const std::string& contents)
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void spit (const std::string& file, const std::vector <std::string>& lines)
|
||||
void spit (
|
||||
const std::string& file,
|
||||
const std::vector <std::string>& lines,
|
||||
bool addNewlines /* = true */)
|
||||
{
|
||||
std::ofstream out (file.c_str ());
|
||||
if (out.good ())
|
||||
{
|
||||
foreach (line, lines)
|
||||
{
|
||||
out << *line;
|
||||
|
||||
if (addNewlines)
|
||||
out << "\n";
|
||||
}
|
||||
|
||||
out.close ();
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue