1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=539559
--- a/src/TodoDB.cc
+++ b/src/TodoDB.cc
@@ -883,27 +883,6 @@
formatItem(cout, ind, todo, options.format["verbose-display"]);
else
formatItem(cout, ind, todo, options.format["display"]);
- if (options.comment && todo.comment != "") {
- int indent = 4 * (ind + 1);
-
- cout << comment << string(indent, ' ');
- if (options.summary) {
- const string s = todo.comment;
-
- if (s.find('\n') != string::npos) {
- if ((int)s.find('\n') < options.columns - 1 - indent)
- cout << s.substr(0, s.find('\n')) << info << "+" << normal;
- else
- cout << s.substr(0, options.columns - 1 - indent) << info << "+" << normal;
- } else
- if ((int)s.size() > options.columns - 3 - indent)
- cout << "(" << s.substr(0, options.columns - 3 - indent) << ")" << info << "+";
- else
- cout << "(" << s << ")";
- } else
- wraptext(cout, "(" + todo.comment + ")", indent, indent, options.columns);
- cout << normal << endl;
- }
}
//if (todo.filterchildren && !todo.unfilteredchildren) continue;
@@ -1232,6 +1211,31 @@
} else
wraptext(out, item.text, i, indent, options.columns);
}
+ if (options.comment && item.comment != "") {
+ if(options.verbose) {
+ out << "\n" << info << string(indent, ' ') << "Comments: " << comment;
+ wraptext(out, item.comment, indent, indent, options.columns);
+ } else {
+ out << "\n" << comment << string(indent, ' ');
+ if (options.summary) {
+ const string s = item.comment;
+
+ if (s.find('\n') != string::npos) {
+ if ((int)s.find('\n') < options.columns - 1 - indent)
+ out << s.substr(0, s.find('\n')) << info << "+" << normal;
+ else
+ out << s.substr(0, options.columns - 1 - indent) << info << "+" << normal;
+ } else
+ if ((int)s.size() > options.columns - 3 - indent)
+ out << "(" << s.substr(0, options.columns - 3 - indent) << ")" << info << "+";
+ else
+ out << "(" << s << ")";
+ } else
+ wraptext(out, "(" + item.comment + ")", indent, indent, options.columns);
+ }
+ out << normal;
+ }
+
break;
case 't' :
if (options.summary) {
|