summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/select.cc8
-rw-r--r--test/baseline/cmd-select.test32
2 files changed, 20 insertions, 20 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 += " + ";
diff --git a/test/baseline/cmd-select.test b/test/baseline/cmd-select.test
index c8ce7008..67ce70f2 100644
--- a/test/baseline/cmd-select.test
+++ b/test/baseline/cmd-select.test
@@ -16,32 +16,32 @@
F
test select "date, account, amount" from posts
-12-Feb-28 E  20.00 EUR
-12-Feb-28 F  -20.00 EUR
-12-Feb-29 Test  10.01 EUR
-12-Feb-29 F  -10.01 EUR
-12-Mar-24 C  30.00 EUR
-12-Mar-24 D  -30.00 EUR
-12-Mar-25 E  40.00 GBP
-12-Mar-25 F  -40.00 GBP
+12-Feb-28 E 20.00 EUR
+12-Feb-28 F -20.00 EUR
+12-Feb-29 Test 10.01 EUR
+12-Feb-29 F -10.01 EUR
+12-Mar-24 C 30.00 EUR
+12-Mar-24 D -30.00 EUR
+12-Mar-25 E 40.00 GBP
+12-Mar-25 F -40.00 GBP
end test
test select "date, account, amount from posts where account =~ /^e/"
-12-Feb-28 E  20.00 EUR
-12-Mar-25 E  40.00 GBP
+12-Feb-28 E 20.00 EUR
+12-Mar-25 E 40.00 GBP
end test
test select "date, account, amount from posts where account =~ /e/"
-12-Feb-28 E  20.00 EUR
-12-Feb-29 Test  10.01 EUR
-12-Mar-25 E  40.00 GBP
+12-Feb-28 E 20.00 EUR
+12-Feb-29 Test 10.01 EUR
+12-Mar-25 E 40.00 GBP
end test
; leave out "from posts" since it is the default
test select "date, account, amount where account =~ /e/"
-12-Feb-28 E  20.00 EUR
-12-Feb-29 Test  10.01 EUR
-12-Mar-25 E  40.00 GBP
+12-Feb-28 E 20.00 EUR
+12-Feb-29 Test 10.01 EUR
+12-Mar-25 E 40.00 GBP
end test
test select "date, payee, amount from posts where account =~ /e/ and commodity =~ /GBP/"