Hi,
with "RichViewEdit.GetCurrentLineCol(l,c)" safe I me the position of the cursor.
After calls from "RichViewEdit.Format" the cursor is on top.
After the "RichViewEdit.Format" command, the cursor should at the before saved position back.
So similarly:
Format does not store the caret position, because Format is usually called when document is not formatted, so the caret position is undefined before its call.
If document is already formatted, why do you can Format?
I would like show and not show the SpecialCharacters:
RichViewEdit.Options:=RichViewEdit.Options-[rvoShowSpecialCharacters];
or
RichViewEdit.Options:=RichViewEdit.Options+[rvoShowSpecialCharacters];
The user can change this setting.
However, "Format" must be called after it. (?)
If I call "FormatTail", the cursor stay at the position, but the content of RichViewEdit is scrolling on bottom.
Yes, document should be reformatted after changing "show special characters" mode. Showing/hiding spaces and paragraph marks does require reformatting, but showing/hiding some Unicode characters (such as soft hyphens) requires reformatting.