From 021866de868fd074526fc63270639ec2f3ce9aa5 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sat, 4 Jul 2020 23:22:03 -0400 Subject: Added `buffer:style_of_name()` as an analogue to `buffer:name_of_style()`. --- modules/textadept/run.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/textadept/run.lua b/modules/textadept/run.lua index 2694166f..561d873a 100644 --- a/modules/textadept/run.lua +++ b/modules/textadept/run.lua @@ -413,9 +413,9 @@ function M.goto_error(line_num, next) end if detail.message then buffer.annotation_text[detail.line] = detail.message - local GETNAMEDSTYLE = _SCINTILLA.properties.named_styles[1] - local style = buffer:private_lexer_call(GETNAMEDSTYLE, 'error') - if not detail.warning then buffer.annotation_style[detail.line] = style end + if not detail.warning then + buffer.annotation_style[detail.line] = buffer:style_of_name('error') + end end end events.connect(events.KEYPRESS, function(code) -- cgit v1.2.3