diff options
author | bptato <nincsnevem662@gmail.com> | 2024-12-22 20:07:47 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-12-22 20:07:47 +0100 |
commit | beed7244d46cc2a0595861d1bab7e83873e4d891 (patch) | |
tree | ae183c126326dfbbd1939cc5f1b76cb0bce13216 /src | |
parent | b4749c232c0eb2e2e325aa3497418e6a6804380d (diff) | |
download | chawan-beed7244d46cc2a0595861d1bab7e83873e4d891.tar.gz |
history: fix entry dropping
next's pointer backwards must be updated too, or it the dropped ref will be erroneously displayed on the history screen.
Diffstat (limited to 'src')
-rw-r--r-- | src/config/history.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/config/history.nim b/src/config/history.nim index 879f0b77..8b903dc8 100644 --- a/src/config/history.nim +++ b/src/config/history.nim @@ -44,6 +44,8 @@ proc add(hist: History; entry: HistoryEntry) = hist.last = entry inc hist.len if hist.len > hist.maxLen: + if hist.first.next != nil: + hist.first.next.prev = nil hist.first = hist.first.next if hist.first == nil: hist.last = nil |