diff options
-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 |