summaryrefslogtreecommitdiff
path: root/context/data/scite/context/scite-ctx.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-10-11 00:26:56 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-10-11 00:26:56 +0200
commitb2db36adbd89b2dba9591da5fc13b4eba57d581e (patch)
treefa1dd5b5b89dc4e56cf3aaf05d45e9b078f51d22 /context/data/scite/context/scite-ctx.lua
parent778f381ba6a448ab00d67994a412dd4226d43238 (diff)
downloadcontext-b2db36adbd89b2dba9591da5fc13b4eba57d581e.tar.gz
2021-10-10 23:42:00
Diffstat (limited to 'context/data/scite/context/scite-ctx.lua')
-rw-r--r--context/data/scite/context/scite-ctx.lua28
1 files changed, 27 insertions, 1 deletions
diff --git a/context/data/scite/context/scite-ctx.lua b/context/data/scite/context/scite-ctx.lua
index 73ef06719..4bde33d2b 100644
--- a/context/data/scite/context/scite-ctx.lua
+++ b/context/data/scite/context/scite-ctx.lua
@@ -415,8 +415,9 @@ do
print("\n- recognized first lines:\n")
print("xml <?xml version='1.0' language='..'")
print("tex % language=..")
- print("")
+ print(" ")
print("(lexing is currently being upgraded / improved / made more native to scite)")
+ print(" ")
end
@@ -1797,4 +1798,29 @@ do
check_output_pane()
end
+ function OnChar()
+ if not editor:AutoCActive() then
+ local syntax = loadedlexers[props.Language]
+ if syntax and syntax.completion then
+ local stop = editor.CurrentPos
+ local start = editor:WordStartPosition(stop,true)
+ local length = stop - start
+ if length >= 2 then
+ local snippet = editor:textrange(start,stop)
+ local list = syntax.completion(snippet)
+ if list then
+ editor.AutoCMaxHeight = 30
+ editor.AutoCSeparator = 32
+ editor:AutoCShow(length,list)
+ end
+ end
+ end
+ end
+ end
+
end
+
+-- function OnKey(a,b,c)
+-- print("key",a,b,c)
+-- end
+