BreakLine on an End of a Line

Post Reply
omata
Posts: 5
Joined: 07 Feb 2010 19:50

BreakLine on an End of a Line

Post by omata »

File: SynEdit.pas

Code: Select all

procedure TCustomSynEdit.ExecuteCommand(Command: TSynEditorCommand; AChar: WideChar; Data: pointer); 
:
      ecLineBreak:
:
              if Command = ecLineBreak then
              begin
                InternalCaretXY := BufferCoord(1, CaretY +1); // <-- is new
                if SpaceCount2 > 0 then
                begin
                  SpaceBuffer := Copy(Lines[BackCounter], 1, SpaceCount2);
//                  InternalCaretXY := BufferCoord(1, CaretY +1); // <-- kill this
                  for i := 1 to Length(SpaceBuffer) do
                    if SpaceBuffer[i] = #9 then
                      CommandProcessor(ecTab, #0, nil)
                    else
                      CommandProcessor(ecChar, SpaceBuffer[i], nil);
                end;
              end;
Maël
Site Admin
Posts: 1454
Joined: 12 Mar 2005 14:15

Re: BreakLine on an End of a Line

Post by Maël »

This forum is not the place to talk about SynEdit. Please use the bug-tracker. SynEdit isn't my personal, but a community project.
omata
Posts: 5
Joined: 07 Feb 2010 19:50

Re: BreakLine on an End of a Line

Post by omata »

I'm sorry.

Please delete my account.
arcostasi
Posts: 1
Joined: 28 Apr 2010 14:46

Re: BreakLine on an End of a Line

Post by arcostasi »

thanks omata, your code works fine! Please continues in the forum, you helped a lot! :D
Post Reply