diff options
author | John Wiegley <johnw@newartisans.com> | 2009-06-14 18:26:26 +0100 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-06-14 18:26:26 +0100 |
commit | 0e642077571ea56039454d0b02a20a55f2e66227 (patch) | |
tree | e1d92928c6fa3aa7c88ee79aa45a67ef015edfe7 | |
parent | 8747c724f120ea5e77e5ba83254c9bf2ce959a16 (diff) | |
download | fork-ledger-0e642077571ea56039454d0b02a20a55f2e66227.tar.gz fork-ledger-0e642077571ea56039454d0b02a20a55f2e66227.tar.bz2 fork-ledger-0e642077571ea56039454d0b02a20a55f2e66227.zip |
If a posting comment is very short, let it hang
This applies when using the "print" report, or the "comment" variable.
-rw-r--r-- | src/item.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/item.cc b/src/item.cc index 758ce254..e54fa6be 100644 --- a/src/item.cc +++ b/src/item.cc @@ -258,10 +258,12 @@ value_t get_comment(item_t& item) if (! item.note) { return string_value(""); } else { - // jww (2009-03-01): If the comment is a short one-liner, put it at the - // end of the post/xact std::ostringstream buf; - buf << "\n ;"; + if (item.note->length() > 15) + buf << "\n ;"; + else + buf << " ;"; + bool need_separator = false; for (const char * p = item.note->c_str(); *p; p++) { if (*p == '\n') { |