anchor.diff:  { This procedure is used to set caret position on keyboard navigation and
     to set selection if Shift key is pressed. }
   procedure TfpgBaseTextEdit.KeyboardCaretNav(const ShiftState: TShiftState; const AKeyCode: Word);
  +var
  +  SaveXCaret: Integer;
   
     procedure CtrlKeyLeftKey;
     var
  
positive.code: implementation
  
  uses
    fpg_dialogs{, fpg_constants}, fpg_stringutils, fpg_utils;
  
  
  function GetNextWord(SLine: TfpgString; var PosX: Integer): Boolean;
  
negative.code:           end;
          end;
  
      keyPageUp, keyPageDown:
          begin
            if not FSelected then
            begin
              FSelStartNo := CaretPos.Y;
              FSelStartOffs := CaretPos.X;
            end;
            SaveXCaret := CaretPos.Y - FTopLine;
            if AKeyCode = keyPageUp then
            begin
              if VPos = 0 then
              begin
                CaretPos.Y := 0;
                CaretPos.X := 0;
              end
              else
              begin
                // scroll text
                if FVScrollBar.Visible then
                  FVScrollBar.PageUp;
                // restore caret at same line offset as before
                CaretPos.Y := FTopLine + SaveXCaret;
              end;
            end
            else
            begin
              if VPos > (FLines.Count - FVisLines) then
              begin
                CaretPos.Y := FLines.Count-1;
                CaretPos.X := Length(FLines[CaretPos.Y]);
              end
              else
              begin
                // scroll text
                if FVScrollBar.Visible then
                  FVScrollBar.PageDown;
                // restore caret at same line offset as before
                CaretPos.Y := FTopLine + SaveXCaret;
              end;
            end;
            if ssShift in ShiftState then
            begin
              FSelEndNo := CaretPos.Y;
              FSelEndOffs := CaretPos.X;
              if not FSelected then
                FSelected := True;
            end;
          end;
    end;
  end;
  
  procedure TfpgBaseTextEdit.InitMemoObjects;
  