////////////////////////////////////////
// WRAP TO RIGHT EDGE
If anyone is interested, wrapping to right edge requires very few modifications to David's patch.
( Find the patch in the BugTracker 30395
http://bugs.freepascal.org/view.php?id=30395 )
In order to wrap to Right edge 2 modifications are needed, both in synedit file:
- adding a new option: eoREdgeWrap
- adding a choice between both modes of display
First,
eoREdgeWrap must be appended to Options2:
File: synedit
TSynEditorOption2 = (
[..]
eoWordWrap, // Truncates long lines into lines that fits onscreen
eoREdgeWrap // If previous is true, wraps to Right Edge value
);
The second modification is in
TCustomSynEdit.RecalcCharsAndLinesInWin :
procedure TCustomSynEdit.RecalcCharsAndLinesInWin(CheckCaret: Boolean);
[..]
FWrappedLinesView.CharsInWindow:= CharsInWindow;
[..]
//This line becomes
if eoREdgeWrap in options2 then
FWrappedLinesView.CharsInWindow:= RightEdge
else FWrappedLinesView.CharsInWindow:= CharsInWindow;
Done!...
Now checking, from your application, both WrapWords and WrapToRightEdge
you get the REdgeWrap otherwise WrapWords alone Wraps to window width.
If anyone find this useful...