🐛 Keep the screen buffer tail pointer valid on inserts

Inserting an item that sorted after everything left the tail
shortcut stale, so later appends unlinked existing nodes. This
leaked screen entries, their textures, and blocked cache eviction
forever.
This commit is contained in:
2026-11-15 22:06:51 +01:00
parent b4a14683cb
commit 2cc0be66c9
+1 -1
View File
@@ -1611,7 +1611,7 @@ begin
current := current^.Next; current := current^.Next;
end; end;
if FShortCuts[-1] = current^.Next then if current^.Next = nil then
FShortCuts[-1] := Result; //Update last item FShortCuts[-1] := Result; //Update last item
Result^.Next := current^.Next; Result^.Next := current^.Next;