On 08/06/2012 12:09, Frank Wunderlich wrote:
> i have a script using editor.WordChars. i think its not a feature from Scite-RU and i
> tried it in GSciTE 3.2.
> i get the following error:
> ..ome/frank/.scite/lua/highlighting_identical_text.lua:98: Pane function / readable
> property / indexed writable property name expected
> which points to this line:
> word_pattern = '[^' .. editor.WordChars .. ']'
> where word_pattern is a local var, so the error can only thrown by editor.WordChars
WordChars is a write-only property, a setter.
You can see that in the iFaceTable.cxx file, among others.
Possible workaround: read directly the property from SciTE. For example:
-- The property set specifically in lua.properties
print('lua', props['word.chars.lua'])
-- The more generic property,
-- but doesn't work for multiple extensions (eg. $(file.patterns.cpp))
local ext = string.lower(props["FileExt"])
print(ext, props['word.characters.*.' .. ext])