[*:uvmajp09]Fixed CASE_CORRECT feature sometimes inserting the wrong word; e.g inserting
Disable
after typing disabled
.
Disable
after typing disabled
.
With the new version of SciTE, it looks like
editor:GetLexerLanguage()
will need to be changed toeditor.LexerLanguage
.
I believe this can be done via Lua, but it is not something I consider important.The next step would be to denote a type of the symbol - an icon to indicate whether it is a function or a variable in the auto-completion list
Yes!Is there a way to set auto-completion list height?
editor:AutoCShow(len, list)Above it, add the following:
editor.AutoCMaxHeight = 15While you're at it, may as well add:
editor.AutoCCaseInsensitiveBehaviour = 1 -- Do NOT pre-select the first case-sensitive matchThis requires Scintilla 3.1.0 or later; the latest SciTE4AutoHotkey will do. This bug ticket describes the problem with the default behaviour. Unfortunately there doesn't appear to be a SciTE property for it yet.
editor:GetLexerLanguage()
to editor.LexerLanguage
doesn't suppress them (latest scite4autohotkey july 22 build)...strator\Documents\AutoHotkey\SciTE/UserLuaScript.lua:222: Pane function / readable property / indexed writable property name expected ...strator\Documents\AutoHotkey\SciTE/UserLuaScript.lua:222: Pane function / readable property / indexed writable property name expected ...strator\Documents\AutoHotkey\SciTE/UserLuaScript.lua:216: Pane function / readable property / indexed writable property name expected ...strator\Documents\AutoHotkey\SciTE/UserLuaScript.lua:216: Pane function / readable property / indexed writable property name expected
()
, and change :
to .
.
editor:AutoCGetCurrent()
to editor.AutoCCurrent
and errors goneThat's the whole point of the AutoCCurrent checks, as indicated in the comments.when the end of the list is reached with arrow keys, the cursor is moving.
editor.AutoCCurrent
is read-only, but I suppose you could figure out which item is at the top/bottom and call editor:AutoCSelect(item)
.
can't useeditor:AutoCSelect(string text) -- Select the item in the auto-completion list that starts with a string.
editor:AutoCSelect(0)
because the parameter is not an index, but a stringeditor:AutoCSelect(menuItems[1])
, but this returns an error:UserLuaScript.lua:230: attempt to index global 'menuItems' (a nil value)
local menuItems = {}
to global menuItems = {}
with no luck.editor.AutoCSelect()
is already correctelseif key == 0x26 then -- VK_UP if editor.AutoCCurrent == 0 then -- User is probably trying to move the caret, since they're -- already at the top of the list. -- selecting Last item editor.AutoCSelect(#menuItems-1) end elseif key == 0x28 then -- VK_DOWN if editor.AutoCCurrent == lastAutoCItem then -- As above, but for the bottom of the list. -- selecting First item editor:AutoCSelect(menuItems[1]) end