mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-06 19:38:24 +02:00
SynEdit: fixed crash, with ecDeleteLine on last line. issue #0020299
git-svn-id: trunk@32424 -
This commit is contained in:
parent
37fa512845
commit
4687ef5cc0
@ -1941,6 +1941,8 @@ begin
|
||||
EnsureCursorPosVisible; // TODO: This may call SetTopLine, change order
|
||||
// This does Paintlock, should be before final decrease
|
||||
// Must be after EnsureCursorPosVisible (as it does MoveCaretToVisibleArea)
|
||||
if FCaret.LinePos > FLines.Count then
|
||||
FCaret.LinePos := FLines.Count;
|
||||
if sfCaretChanged in fStateFlags then
|
||||
UpdateCaret;
|
||||
//if sfScrollbarChanged in fStateFlags then
|
||||
@ -4929,6 +4931,7 @@ begin
|
||||
ScanRanges;
|
||||
InvalidateLines(AIndex + 1, -1);
|
||||
InvalidateGutterLines(AIndex + 1, -1);
|
||||
if FCaret.LinePos > FLines.Count then FCaret.LinePos := FLines.Count;
|
||||
end;
|
||||
if TopLine > AIndex + 1 then
|
||||
TopLine := TopLine + ACount // will call UpdateScrollBars
|
||||
|
Loading…
Reference in New Issue
Block a user