diff options
author | Hans Hagen <pragma@wxs.nl> | 2021-10-15 15:03:57 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2021-10-15 15:03:57 +0200 |
commit | 6ca88e6f1f15cea89db047839c3126a501f39eea (patch) | |
tree | e87d8a0ad20389157a8ccb02278d3a94152877c9 /context | |
parent | cc7fcf11d31b2db23ba3adca896507f9faf128cc (diff) | |
download | context-6ca88e6f1f15cea89db047839c3126a501f39eea.tar.gz |
2021-10-15 13:59:00
Diffstat (limited to 'context')
-rw-r--r-- | context/data/scite/context/lexers/scite-context-lexer.lua | 2 | ||||
-rw-r--r-- | context/data/scite/context/scite-ctx.lua | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/context/data/scite/context/lexers/scite-context-lexer.lua b/context/data/scite/context/lexers/scite-context-lexer.lua index fd74ba55a..121bfd249 100644 --- a/context/data/scite/context/lexers/scite-context-lexer.lua +++ b/context/data/scite/context/lexers/scite-context-lexer.lua @@ -1248,7 +1248,7 @@ if usage == "scite" then -- foldpattern = Cp() * (foldpattern/foldmapping) / function(s,match) if match then - local l = match[thestyleat[s + foldoffset]] + local l = match[thestyleat[s + foldoffset - 1]] if l then current = current + l end diff --git a/context/data/scite/context/scite-ctx.lua b/context/data/scite/context/scite-ctx.lua index 4bde33d2b..326ee1180 100644 --- a/context/data/scite/context/scite-ctx.lua +++ b/context/data/scite/context/scite-ctx.lua @@ -1739,7 +1739,7 @@ do local lexers = nil local properties = props --- local partial = false + local partial = false local partial = true local trace = false -- local trace = true @@ -1784,14 +1784,18 @@ do end function OnOpen(filename) - -- report("opening '%s' of %i bytes",filename,editor.TextLength) + if trace then + report("opening '%s' of %i bytes, language '%s'",filename,editor.TextLength,props.Language) + end update(props.Language,editor.TextLength,0,editor.TextLength) check_output_pane() end function OnSwitchFile(filename) if dirty[props.FileNameExt] then - -- report("switching '%s' of %i bytes",filename,editor.TextLength) + if trace then + report("switching '%s' of %i bytes, language '%s'",filename,editor.TextLength,props.Language) + end update(props.Language,editor.TextLength,0,editor.TextLength) dirty[props.FileNameExt] = false end |