markText() function to underline some characters in a line and indicate errors to end user.
I would like to underline the very last part of the line :
^ underline this (which is usually line return)
this would give:
The main issue is that the part I want to underline/mark does not exist as a character of the line. The only possibility would be for the line to end up with an extra space which is not the case.
If there’s no text there, you indeed can’t mark it. You could add a bookmark with a widget there.
I have tried to use
bookmark function (the widget is simply a
It works but the widget prevent selecting the text correctly (eg: you click on widget by mistake and start dragging selection from there).
EDIT : what happen is the editor lose focus as soon as you click the widget (and thus stop responding to mouse events). It might be fixable.
handleMouseEvents option to
setBookmark might help with that.
This fixed the issue. Thanks a lot. We can close the topic