textadept icon indicating copy to clipboard operation
textadept copied to clipboard

The property `buffer.eol_annotation_style` sets the wrong style

Open davidvontamar opened this issue 3 years ago • 1 comments
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.

davidvontamar avatar Oct 02 '22 18:10 davidvontamar

You are correct, thanks for the report.

orbitalquark avatar Oct 03 '22 13:10 orbitalquark

Fixed via https://github.com/orbitalquark/textadept/commit/8fdd8273adf5c68be4a90503aa8aa26021e2c808

orbitalquark avatar Oct 06 '22 13:10 orbitalquark