summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/format.cc5
-rw-r--r--src/report.cc4
-rw-r--r--src/value.cc3
3 files changed, 7 insertions, 5 deletions
diff --git a/src/format.cc b/src/format.cc
index f881cf37..cfbe5172 100644
--- a/src/format.cc
+++ b/src/format.cc
@@ -245,11 +245,10 @@ void format_t::format(std::ostream& out_str, scope_t& scope)
else
out << std::right;
- if (elem->min_width > 0)
- out.width(elem->min_width);
-
switch (elem->type) {
case element_t::STRING:
+ if (elem->min_width > 0)
+ out.width(elem->min_width);
out << elem->chars;
break;
diff --git a/src/report.cc b/src/report.cc
index 604a2a47..9227ee2c 100644
--- a/src/report.cc
+++ b/src/report.cc
@@ -64,10 +64,10 @@ report_t::report_t(session_t& _session)
"%(entry.cleared ? \" *\" : (entry.pending ? \" !\" : \"\"))"
"%(code ? \" (\" + code + \")\" : \"\") %(payee)%(entry.comment | \"\")\n"
" %(entry.uncleared ? (cleared ? \"* \" : (pending ? \"! \" : \"\")) : \"\")"
- "%-23(account)"
+ "%-34(account)"
" %12(calculated ? \"\" : amount)%(comment | \"\")\n%/"
" %(entry.uncleared ? (cleared ? \"* \" : (pending ? \"! \" : \"\")) : \"\")"
- "%-23(account)"
+ "%-34(account)"
" %12(calculated ? \"\" : amount)%(comment | \"\")\n%/\n");
HANDLER(balance_format_).on(
diff --git a/src/value.cc b/src/value.cc
index 71c6e0fe..cb45660e 100644
--- a/src/value.cc
+++ b/src/value.cc
@@ -1263,6 +1263,9 @@ void value_t::print(std::ostream& out,
const int latter_width,
const optional<string>& date_format) const
{
+ if (first_width > 0 && ! is_amount() && ! is_balance())
+ out.width(first_width);
+
switch (type()) {
case VOID:
out << "";