textadept
textadept copied to clipboard
The property `buffer.eol_annotation_style` sets the wrong style
trafficstars
The function buffer:style_of_name("comment") returns the style number associated with the style comment, whose index is 2.
However, the following code:
buffer.eol_annotation_style[issue.line] = buffer:style_of_name("comment")
will result in these annotations using the string style, whose index is 3.
Instead, the following code:
buffer.eol_annotation_style[issue.line] = buffer:style_of_name("comment") - 1
corrects the style selection to comment.
I've tested buffer:style_of_name("comment") and it indeed returns 2, the correct index for comment (as Ctrl+I indicates). Therefore, the problem must be with buffer.eol_annotation_style.
You are correct, thanks for the report.
Fixed via https://github.com/orbitalquark/textadept/commit/8fdd8273adf5c68be4a90503aa8aa26021e2c808