anchor.diff:              FSelStartNo := CaretPos.Y;
               FSelStartOffs := CaretPos.X;
             end;
  -          SaveXCaret := CaretPos.Y - FTopLine;
  +          SaveYCaretOffset := CaretPos.Y - FTopLine;
             if AKeyCode = keyPageUp then
             begin
               if VPos = 0 then
  
positive.code:   to set selection if Shift key is pressed. }
  procedure TfpgBaseTextEdit.KeyboardCaretNav(const ShiftState: TShiftState; const AKeyCode: Word);
  var
    SaveXCaret: Integer;
  
    procedure CtrlKeyLeftKey;
    var
  
negative.code:               if FVScrollBar.Visible then
                  FVScrollBar.PageUp;
                // restore caret at same line offset as before
                CaretPos.Y := FTopLine + SaveYCaretOffset;
              end;
            end
            else
            begin  { PageDown handling }
              if VPos > (FLines.Count - FVisLines) then
              begin
                CaretPos.Y := FLines.Count-1;
  