from Martin Friebe:

- inserting a line, would not correctly re-paint the other lines, if a folded block was in the visible window, above the 
newly inserted line
- using ctr-cursur-up to scroll, would make the cursor jump away from the lower end of the window, if a folded block existed
- bracket search did not use ScreenRowToRow for "VisibleOnly" (which appears un-used, so this part of the bug is currently 
not triggered)

git-svn-id: trunk@15776 -
This commit is contained in:
mattias 2008-07-14 07:27:58 +00:00
parent 19919c7035
commit cb41bdea0d

View File

@ -6285,8 +6285,8 @@ begin
if (Lines.Count > 1) then if (Lines.Count > 1) then
ScanFrom(0); ScanFrom(0);
end; end;
InvalidateLines(Index + 1, TopLine + LinesInWindow); InvalidateLines(Index + 1, {$IFDEF SYN_LAZARUS}ScreenRowToRow(LinesInWindow+1){$ELSE}TopLine + LinesInWindow{$ENDIF});
InvalidateGutterLines(Index + 1, TopLine + LinesInWindow); InvalidateGutterLines(Index + 1, {$IFDEF SYN_LAZARUS}ScreenRowToRow(LinesInWindow+1){$ELSE}TopLine + LinesInWindow{$ENDIF});
end; end;
procedure TCustomSynEdit.ListPutted(Index: Integer); procedure TCustomSynEdit.ListPutted(Index: Integer);
@ -8593,8 +8593,8 @@ begin
ecScrollUp: ecScrollUp:
begin begin
TopLine := TopLine - 1; TopLine := TopLine - 1;
if CaretY > TopLine + LinesInWindow - 1 then if CaretY > {$IFDEF SYN_LAZARUS}ScreenRowToRow(LinesInWindow-1){$ELSE}TopLine + LinesInWindow - 1{$ENDIF} then
CaretY := TopLine + LinesInWindow - 1; CaretY := {$IFDEF SYN_LAZARUS}ScreenRowToRow(LinesInWindow-1){$ELSE}TopLine + LinesInWindow - 1{$ENDIF};
Update; Update;
end; end;
ecScrollDown: ecScrollDown:
@ -10456,8 +10456,10 @@ procedure TCustomSynEdit.InvalidateLine(Line: integer);
var var
rcInval: TRect; rcInval: TRect;
begin begin
if Visible and (Line >= TopLine) and (Line <= TopLine + LinesInWindow) and if Visible and (Line >= TopLine) and
(Line <= Lines.Count) and HandleAllocated (Line <= {$IFDEF SYN_LAZARUS}ScreenRowToRow(LinesInWindow){$ELSE}
TopLine + LinesInWindow{$ENDIF})
and (Line <= Lines.Count) and HandleAllocated
then begin then begin
{$IFDEF SYN_LAZARUS} {$IFDEF SYN_LAZARUS}
fMarkupHighAll.InvalidateLines(Line, Line); fMarkupHighAll.InvalidateLines(Line, Line);
@ -10640,7 +10642,8 @@ var
// get previous line if possible // get previous line if possible
if PosY = 1 then break; if PosY = 1 then break;
Dec(PosY); Dec(PosY);
if OnlyVisible and ((PosY<TopLine) or (PosY>=TopLine+LinesInWindow)) if OnlyVisible and ((PosY<TopLine)
or (PosY >= {$IFDEF SYN_LAZARUS}ScreenRowToRow(LinesInWindow){$ELSE}TopLine+LinesInWindow{$ENDIF}))
then then
break; break;
Line := Lines[PosY - 1]; Line := Lines[PosY - 1];
@ -10667,7 +10670,8 @@ var
// get next line if possible // get next line if possible
if PosY = Lines.Count then break; if PosY = Lines.Count then break;
Inc(PosY); Inc(PosY);
if OnlyVisible and ((PosY<TopLine) or (PosY>=TopLine+LinesInWindow)) if OnlyVisible and ((PosY < TopLine)
or (PosY >= {$IFDEF SYN_LAZARUS}ScreenRowToRow(LinesInWindow){$ELSE}TopLine+LinesInWindow{$ENDIF}))
then then
break; break;
Line := Lines[PosY - 1]; Line := Lines[PosY - 1];
@ -10703,7 +10707,8 @@ begin
PosX := LogicalStart.X; PosX := LogicalStart.X;
PosY := LogicalStart.Y; PosY := LogicalStart.Y;
if (PosY<1) or (PosY>Lines.Count) then exit; if (PosY<1) or (PosY>Lines.Count) then exit;
if OnlyVisible and ((PosY<TopLine) or (PosY>=TopLine+LinesInWindow)) then if OnlyVisible and ((PosY<TopLine)
or (PosY >= {$IFDEF SYN_LAZARUS}ScreenRowToRow(LinesInWindow){$ELSE}TopLine+LinesInWindow{$ENDIF})) then
exit; exit;
Line := LineText; Line := LineText;