synedit: fix hang when pressed HOME key on the first line (bug #0012983)

git-svn-id: trunk@18372 -
This commit is contained in:
paul 2009-01-21 09:14:42 +00:00
parent af0d7249f4
commit def590b362

View File

@ -121,11 +121,12 @@ begin
SpaceCount2 := 0;
BackCounter := PhysCaret.Y - 1;
repeat
Dec(BackCounter);
Temp := Editor.RealLines[BackCounter];
SpaceCount2 := LeftSpaces(Editor, Temp, True);
until (BackCounter = 0) or (Temp <> '');
if BackCounter > 0 then
repeat
Dec(BackCounter);
Temp := Editor.RealLines[BackCounter];
SpaceCount2 := LeftSpaces(Editor, Temp, True);
until (BackCounter = 0) or (Temp <> '');
case FIndentType of
sbitSpace: