From ee8ef57e3c7d6839df44411fefeaea10c4c837aa Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 26 May 2020 14:26:49 -0400 Subject: Updated to latest Scintilla with ability to get style number from name. --- modules/textadept/run.lua | 5 +++-- src/Makefile | 2 +- src/textadept.c | 1 + 3 files changed, 5 insertions(+), 3 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) diff --git a/src/Makefile b/src/Makefile index e6280f78..1e18acea 100644 --- a/src/Makefile +++ b/src/Makefile @@ -376,7 +376,7 @@ else gtdialog_url = http://foicica.com/hg/gtdialog/archive/tip.zip endif -scintilla_zip = 65f5ef3129ca.zip +scintilla_zip = b276a93eeb2f.zip lua_tgz = lua-5.3.5.tar.gz lpeg_tgz = lpeg-1.0.2.tar.gz lfs_zip = v1_7_0_2.zip diff --git a/src/textadept.c b/src/textadept.c index dc79ea47..8e743087 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -1152,6 +1152,7 @@ static int call_scintilla( ltype = SINT; break; case SCI_SETLEXERLANGUAGE: case SCI_LOADLEXERLIBRARY: ltype = SSTRING; break; + case SCI_GETNAMEDSTYLES: ltype = SSTRING, rtype = SINDEX; break; default: ltype = SSTRINGRET; } -- cgit v1.2.3