I can't explain my intent. 
This is my Delphi source code.

procedure TCFBindings.CursorToWordLeft(const Context: IOTAKeyContext; KeyCode:
    TShortCut; var BindingResult: TKeyBindingResult);
begin
  with Context.EditBuffer.EditPosition do
  begin
    if Column = 1 then
      MoveCursor(mmSkipLeft or mmSkipStream)
    else
    begin
      MoveCursor(mmSkipLeft or mmSkipWhite);
      MoveRelative(0, -1);
      if IsWordCharacter then
        MoveCursor(mmSkipLeft or mmSkipWord)
      else
        MoveCursor(mmSkipLeft or mmSkipSpecial);
    end;
  end;
  BindingResult := krHandled;
end;

procedure TCFBindings.CursorToWordRight(const Context: IOTAKeyContext; KeyCode:
    TShortCut; var BindingResult: TKeyBindingResult);
begin
  with Context.EditBuffer.EditPosition do
  begin
    if (Character = #$D) or (Character = #$A) then
      MoveCursor(mmSkipRight or mmSkipStream)
    else
    begin
      MoveCursor(mmSkipRight or mmSkipWhite);
      if IsWordCharacter then
        MoveCursor(mmSkipRight or mmSkipWord)
      else if IsSpecialCharacter then
        MoveCursor(mmSkipRight or mmSkipSpecial);
    end;
  end;
  BindingResult := krHandled;
end;


-- 
<http://forum.pspad.com/read.php?2,50083,50083>
PSPad freeware editor http://www.pspad.com

Odpovedet emailem