summaryrefslogtreecommitdiff
path: root/src/format.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-06-28 15:53:46 +0100
committerJohn Wiegley <johnw@newartisans.com>2009-06-28 15:53:46 +0100
commite8f315f00d0874e2afdee45525c4ce96d0768336 (patch)
tree2f8c3273fc1e5567e2326a66b4017b9f7c39caa2 /src/format.cc
parent6e582a87774140337b56568358e27e7cfe09514c (diff)
downloadfork-ledger-e8f315f00d0874e2afdee45525c4ce96d0768336.tar.gz
fork-ledger-e8f315f00d0874e2afdee45525c4ce96d0768336.tar.bz2
fork-ledger-e8f315f00d0874e2afdee45525c4ce96d0768336.zip
Correctly align amounts formatted as "%12(amount)"
Diffstat (limited to 'src/format.cc')
-rw-r--r--src/format.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/format.cc b/src/format.cc
index 6620e5a4..ecac1133 100644
--- a/src/format.cc
+++ b/src/format.cc
@@ -345,7 +345,8 @@ void format_t::format(std::ostream& out_str, scope_t& scope)
}
DEBUG("format.expr", "value = (" << value << ")");
- value.print(out, elem->min_width);
+ value.print(out, elem->min_width, -1,
+ ! elem->has_flags(ELEMENT_ALIGN_LEFT));
}
catch (const calc_error&) {
add_error_context(_("While calculating format expression:"));