lua-inspect
lua-inspect copied to clipboard
scite 3.2.1 incompatibility
lua-inspect is not compatible with scite 3.2.1, minor tweaks are needed, see: https://groups.google.com/forum/?fromgroups#!topic/scite-interest/8PdNdUtGfBo
Here is a patch for scite 3.2.1:
diff --git a/lib/luainspect/scite.lua b/lib/luainspect/scite.lua
index b112cf2..6e330ab 100644
--- a/lib/luainspect/scite.lua
+++ b/lib/luainspect/scite.lua
@@ -397,7 +397,7 @@ local function update_ast()
local errlinenum0 = errfpos0 and editor:LineFromPosition(errlpos0+1) or li
-- note: +1 to avoid error message moving above cursor on pressing Ente
editor.AnnotationStyle[errlinenum0] = S_COMPILER_ERROR
- editor:AnnotationSetText(errlinenum0, "error " .. err)
+ editor.AnnotationText[errlinenum0]="error " .. err
if linenum2 then -- display error in two locations
--old:editor.AnnotationStyle[linenum2-1] = S_COMPILER_ERROR
-- editor:AnnotationSetText(linenum2-1, "error " .. err)
@@ -1525,26 +1525,26 @@ without ``) to your SciTE Lua startup script (i.e. the f
ile identified in your
-- Define markers and indicators.
editor:MarkerDefine(MARKER_ERRORLINE, SC_MARK_CHARACTER+33) -- '!'
- editor:MarkerSetFore(MARKER_ERRORLINE, 0xffffff)
- editor:MarkerSetBack(MARKER_ERRORLINE, 0x0000ff)
+ editor.MarkerFore[MARKER_ERRORLINE]=0xffffff
+ editor.MarkerBack[MARKER_ERRORLINE]=0x0000ff
editor:MarkerDefine(MARKER_ERROR, SC_MARK_FULLRECT)
- editor:MarkerSetBack(MARKER_ERROR, 0x000080)
- editor:MarkerSetAlpha(MARKER_ERROR, 10)
+ editor.MarkerBack[MARKER_ERROR]=0x000080
+ editor.MarkerAlpha[MARKER_ERROR]=10
editor:MarkerDefine(MARKER_SCOPEBEGIN, SC_MARK_TCORNERCURVE)
editor:MarkerDefine(MARKER_SCOPEMIDDLE, SC_MARK_VLINE)
editor:MarkerDefine(MARKER_SCOPEEND, SC_MARK_LCORNERCURVE)
- editor:MarkerSetFore(MARKER_SCOPEBEGIN, 0x0000ff)
- editor:MarkerSetFore(MARKER_SCOPEMIDDLE, 0x0000ff)
- editor:MarkerSetFore(MARKER_SCOPEEND, 0x0000ff)
+ editor.MarkerFore[MARKER_SCOPEBEGIN]=0x0000ff
+ editor.MarkerFore[MARKER_SCOPEMIDDLE]=0x0000ff
+ editor.MarkerFore[MARKER_SCOPEEND]=0x0000ff
editor:MarkerDefine(MARKER_MASKED, SC_MARK_CHARACTER+77) -- 'M'
- editor:MarkerSetFore(MARKER_MASKED, 0xffffff)
- editor:MarkerSetBack(MARKER_MASKED, 0x000080)
+ editor.MarkerFore[MARKER_MASKED]=0xffffff
+ editor.MarkerBack[MARKER_MASKED]=0x000080
editor:MarkerDefine(MARKER_MASKING, SC_MARK_CHARACTER+77) -- 'M'
- editor:MarkerSetFore(MARKER_MASKING, 0xffffff)
- editor:MarkerSetBack(MARKER_MASKING, 0x0000ff)
+ editor.MarkerFore[MARKER_MASKING]=0xffffff
+ editor.MarkerBack[MARKER_MASKING]=0x0000ff
editor:MarkerDefine(MARKER_WAIT, SC_MARK_CHARACTER+43) -- '+'
- editor:MarkerSetFore(MARKER_WAIT, 0xffffff)
- editor:MarkerSetBack(MARKER_WAIT, 0xff0000)
+ editor.MarkerFore[MARKER_WAIT]=0xffffff
+ editor.MarkerBack[MARKER_WAIT]=0xff0000
editor.IndicStyle[INDICATOR_AUTOCOMPLETE] = INDIC_BOX
editor.IndicFore[INDICATOR_AUTOCOMPLETE] = 0xff0000
local indic_style = props["style.script_lua.indic_style"]