summaryrefslogtreecommitdiff
path: root/src/select.cc
diff options
context:
space:
mode:
authorMartin Michlmayr <tbm@cyrius.com>2014-05-30 22:01:08 -0400
committerMartin Michlmayr <tbm@cyrius.com>2014-05-30 22:01:08 -0400
commitdfcbbd169e7b975f37744ad65e4e324c5f6c42cb (patch)
tree21f50f3b1849bbb641d215673d621e5a84667e6a /src/select.cc
parentb2b84f35b4ac5b794b4cf82b721948fbe263718d (diff)
downloadfork-ledger-dfcbbd169e7b975f37744ad65e4e324c5f6c42cb.tar.gz
fork-ledger-dfcbbd169e7b975f37744ad65e4e324c5f6c42cb.tar.bz2
fork-ledger-dfcbbd169e7b975f37744ad65e4e324c5f6c42cb.zip
Fix query string for select account
A wrong query string was generated by "select account": one ansify_if() too much was listed and justify() was called with the wrong parameters. Bug fix for #744
Diffstat (limited to 'src/select.cc')
-rw-r--r--src/select.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/select.cc b/src/select.cc
index 201a0db1..45ae34be 100644
--- a/src/select.cc
+++ b/src/select.cc
@@ -291,17 +291,17 @@ value_t select_command(call_scope_t& args)
thus_far += "int(payee_width) + 1";
}
else if (ident == "account") {
- formatter << "ansify_if("
- << "ansify_if(";
+ formatter << "ansify_if(";
if (accounts_report) {
+ formatter << "ansify_if(";
formatter << "partial_account(options.flat), blue if color),";
} else {
formatter << "justify(truncated(";
as_expr(column)->print(formatter);
formatter << ", int(account_width), int(abbrev_len)),"
- << "int(account_width)),";
- formatter << "true, color),";
+ << "int(account_width), -1, ";
+ formatter << "false, color),";
if (! thus_far.empty())
thus_far += " + ";