mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-21 11:48:21 +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
|
EnsureCursorPosVisible; // TODO: This may call SetTopLine, change order
|
||||||
// This does Paintlock, should be before final decrease
|
// This does Paintlock, should be before final decrease
|
||||||
// Must be after EnsureCursorPosVisible (as it does MoveCaretToVisibleArea)
|
// Must be after EnsureCursorPosVisible (as it does MoveCaretToVisibleArea)
|
||||||
|
if FCaret.LinePos > FLines.Count then
|
||||||
|
FCaret.LinePos := FLines.Count;
|
||||||
if sfCaretChanged in fStateFlags then
|
if sfCaretChanged in fStateFlags then
|
||||||
UpdateCaret;
|
UpdateCaret;
|
||||||
//if sfScrollbarChanged in fStateFlags then
|
//if sfScrollbarChanged in fStateFlags then
|
||||||
@ -4929,6 +4931,7 @@ begin
|
|||||||
ScanRanges;
|
ScanRanges;
|
||||||
InvalidateLines(AIndex + 1, -1);
|
InvalidateLines(AIndex + 1, -1);
|
||||||
InvalidateGutterLines(AIndex + 1, -1);
|
InvalidateGutterLines(AIndex + 1, -1);
|
||||||
|
if FCaret.LinePos > FLines.Count then FCaret.LinePos := FLines.Count;
|
||||||
end;
|
end;
|
||||||
if TopLine > AIndex + 1 then
|
if TopLine > AIndex + 1 then
|
||||||
TopLine := TopLine + ACount // will call UpdateScrollBars
|
TopLine := TopLine + ACount // will call UpdateScrollBars
|
||||||
|
Loading…
Reference in New Issue
Block a user