Annotations (line and end-of-line) is a nice feature.
But they are difficult to deal with when the user can also edit the files, because then annotations may change line (i.e., line number) and the line may even disappear.
Line number is difficult to use as the "handle" to the annotation. You inserted an annotation on line 28 but now it is on line 30 or has disappeared.
So it would be "nice" with an independent handle to an annotation. Given such a handle you can update and delete the annotation even though you don't know where it is now located. And you can ask about its current line number and whether is is still existing, and perhaps be notified when it change line or disappears.
EOL Annotations were contributed with [#2141] as a simple clone of the Annotation feature.
While its been tried a few times, there is no good high-performance infrastructure for tracking an arbitrary set of positions in Scintilla.
SCI_MARKERLINEFROMHANDLE
actually scans from line 0 on every call.You could stick an ID in the annotation text and scan for that with the current API or propose a new API that would store/retrieve/scan for a handle. An extra
int
inAnnotationHeader
is likely OK.Related
Bugs:
#2141