aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2020-05-26 14:26:49 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2020-05-26 14:26:49 -0400
commitee8ef57e3c7d6839df44411fefeaea10c4c837aa (patch)
treead525b6432c69340d97a1b8e22e836e089455859 /modules/textadept
parent02dcc60155cb8a111366fe8e2f4340c63a37ed9a (diff)
downloadtextadept-ee8ef57e3c7d6839df44411fefeaea10c4c837aa.tar.gz
textadept-ee8ef57e3c7d6839df44411fefeaea10c4c837aa.zip
Updated to latest Scintilla with ability to get style number from name.
Diffstat (limited to 'modules/textadept')
-rw-r--r--modules/textadept/run.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/textadept/run.lua b/modules/textadept/run.lua
index c130abc1..77cad2d0 100644
--- a/modules/textadept/run.lua
+++ b/modules/textadept/run.lua
@@ -413,8 +413,9 @@ function M.goto_error(line_num, next)
end
if detail.message then
buffer.annotation_text[detail.line] = detail.message
- -- Style number 9 is the error style.
- if not detail.warning then buffer.annotation_style[detail.line] = 9 end
+ 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
end
end
events.connect(events.KEYPRESS, function(code)