First of all, to clarify my previous answer.
It is technically possible to do the wrong word underlining using a highlighter. It is just not the way it was designed. And, you can only use ONE highlighter, so if you use it for this, then you can't use it for anything else.
There is a wiki on markup
https://wiki.freepascal.org/SynEdit_Markup but yes no examples.
Yes, SyneditBase must always be a full SynEdit => It is only there to avoid circular unit uses.
Why do you remove one of the existing Markups?
You can add yours, without removing one.
Some of the existing Markup are essential (like showing the current selected text is a markup - I don't think you want to remove that?)
Red curly underline ("m" is the markup)
uses SynEditTypes;
...
m.MarkupInfo.FrameEdges := sfeBottom;
m.MarkupInfo.FrameStyle := slsWaved;
m.MarkupInfo.FrameColor:= clRed;
MyMarkup.SearchOptions := [ssoWholeWord]; does not work for me (see the screenshot attached).
The screenshot seems missing?
But anyway, you are right => that only works for Latin at the moment. The internally used "FSearch: TSynEditSearch" has "property IdentChars: TSynIdentChars" which is a "set of char" and therefore only support Latin.
But the idea was that you would subclass the markup, with your own code.Having more than one markup ("myMarkup: array of TSynEditMarkupHighlightAll;") is not the way to go.
You should override
function TSynEditMarkupHighlightAll.FindMatches
Look at the original code.
You would not use "fSearch.FindNextOne", but you would go through the text yourself.
for i := AStartPoint.y - 1 to AEndPoint.y-1 do begin // those are 1-based // lines is 0-based
linetext := lines[i];
// check for misspelled words
LStart := 1;
LEnd := length(linetext):
for xpos := LStart to LEnd do begin
end ;
// e.g. find next word start, find the end, take the word and spellcheck it ...
....
if ... then
FMatches.Insert(...)
end;
And then any words found are added: "FMatches.Insert(...)" // FMatches are NOT allowed to be multi-line.
On the first and last line you should also check the X pos. Any word found must be at least partially inside the line-part given by X.
If AStartPoint.x is in the middle of a word AStartPoint.x = 7 and linetext ="ab verylongword" then IIRC you should find verylongword too.
If ABackward is set, then you must find ONLY ONE word (or NONE) which is the first that you find going backwards from end-pos.
Result is the start of the last (or for ABackward the only) found word.