Fix cursor ghost at end of lines when cursor changes rows

WriteDeferredBuf now dirties the old cursor row before the render
loop so the reverse-video cursor block is erased.  FlipToScreen's
ghost cleanup was ineffective because FLastCursorRow was already
updated by WriteDeferredBuf.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Duensing 2026-03-03 16:58:56 -06:00
parent cb2018dff4
commit 9102dd1938

View file

@ -2188,6 +2188,13 @@ begin
SelectObject(FLiveDC, FPaintFont); SelectObject(FLiveDC, FPaintFont);
SetBkMode(FLiveDC, OPAQUE); SetBkMode(FLiveDC, OPAQUE);
FlushPendingScrolls; FlushPendingScrolls;
{ Dirty old cursor row to erase ghost when cursor moved between rows }
if FCursorRow <> FLastCursorRow then
begin
if (FLastCursorRow >= 0) and (FLastCursorRow < FRows) then
FDirtyRow[FLastCursorRow] := True;
FDirtyRow[FCursorRow] := True;
end;
for Row := 0 to FRows - 1 do for Row := 0 to FRows - 1 do
begin begin
if FAllDirty or FDirtyRow[Row] then if FAllDirty or FDirtyRow[Row] then