summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/account.cc4
-rw-r--r--src/output.cc4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/account.cc b/src/account.cc
index 711e815e..58d9392f 100644
--- a/src/account.cc
+++ b/src/account.cc
@@ -140,7 +140,7 @@ string account_t::partial_name(bool flat) const
if (! flat) {
std::size_t count = acct->children_with_flags(ACCOUNT_EXT_TO_DISPLAY);
assert(count > 0);
- if (count > 1)
+ if (count > 1 || acct->has_flags(ACCOUNT_EXT_TO_DISPLAY))
break;
}
pname = acct->name + ":" + pname;
@@ -202,7 +202,7 @@ namespace {
acct = acct->parent) {
std::size_t count = acct->children_with_flags(ACCOUNT_EXT_TO_DISPLAY);
assert(count > 0);
- if (count > 1)
+ if (count > 1 || acct->has_flags(ACCOUNT_EXT_TO_DISPLAY))
depth++;
}
diff --git a/src/output.cc b/src/output.cc
index 63d8c919..c4317934 100644
--- a/src/output.cc
+++ b/src/output.cc
@@ -179,7 +179,9 @@ format_accounts::mark_accounts(account_t& account, const bool flat)
(account.has_flags(ACCOUNT_EXT_VISITED) || (! flat && visited > 0))) {
bind_scope_t bound_scope(report, account);
if ((! flat && to_display > 1) ||
- (disp_pred(bound_scope) && (flat || to_display != 1))) {
+ ((flat || to_display != 1 ||
+ account.has_flags(ACCOUNT_EXT_VISITED)) &&
+ disp_pred(bound_scope))) {
account.xdata().add_flags(ACCOUNT_EXT_TO_DISPLAY);
DEBUG("account.display", "Marking account as TO_DISPLAY");
to_display = 1;