summaryrefslogtreecommitdiff
path: root/src/textual.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/textual.cc')
-rw-r--r--src/textual.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/textual.cc b/src/textual.cc
index eef2cc27..61cfd09a 100644
--- a/src/textual.cc
+++ b/src/textual.cc
@@ -552,7 +552,9 @@ entry_t * parse_entry(std::istream& in, char * line, account_t * master,
}
if (xact_t * xact = parse_xact(line, master, curr.get())) {
- xact->set_state(state);
+ if ((state == item_t::CLEARED && xact->state() != item_t::CLEARED) ||
+ (state == item_t::PENDING && xact->state() == item_t::UNCLEARED))
+ xact->set_state(state);
xact->beg_pos = beg_pos;
xact->beg_line = beg_line;