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 » 07 Feb 2010 19:54

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: 1095
Joined: 12 Mar 2005 14:15

Re: BreakLine on an End of a Line

Post by Maël » 08 Feb 2010 19:37

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 » 09 Feb 2010 20:33

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 » 28 Apr 2010 14:51

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

Post Reply