Page 1 of 1

BreakLine on an End of a Line

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

Re: BreakLine on an End of a Line

Posted: 08 Feb 2010 19:37
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.

Re: BreakLine on an End of a Line

Posted: 09 Feb 2010 20:33
by omata
I'm sorry.

Please delete my account.

Re: BreakLine on an End of a Line

Posted: 28 Apr 2010 14:51
by arcostasi
thanks omata, your code works fine! Please continues in the forum, you helped a lot! :D