From dfcbbd169e7b975f37744ad65e4e324c5f6c42cb Mon Sep 17 00:00:00 2001 From: Martin Michlmayr Date: Fri, 30 May 2014 22:01:08 -0400 Subject: 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 --- src/select.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/select.cc') 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 += " + "; -- cgit v1.2.3