diff options
| author | mitchell <unknown> | 2020-07-13 15:18:05 -0400 |
|---|---|---|
| committer | mitchell <unknown> | 2020-07-13 15:18:05 -0400 |
| commit | c8415f6bb194477fcdd8a9f0c6f8551f1749e6b6 (patch) | |
| tree | a81a96a65433218089e580de280a67b1dc7bf493 /lexlua/lexer.lua | |
| parent | be2b4322cbb398b33ee9641d04463b663c781e1a (diff) | |
| download | scintilla-mirror-c8415f6bb194477fcdd8a9f0c6f8551f1749e6b6.tar.gz | |
lexlua: Return `lexer.colors.name` as a number if possible.
Diffstat (limited to 'lexlua/lexer.lua')
| -rw-r--r-- | lexlua/lexer.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lexlua/lexer.lua b/lexlua/lexer.lua index 0a92f6064..3f24dd79c 100644 --- a/lexlua/lexer.lua +++ b/lexlua/lexer.lua @@ -886,7 +886,10 @@ end -- @name colors -- @class table M.colors = setmetatable({}, { - __index = function(_, name) return M.property['color.' .. name] end, + __index = function(_, name) + local color = M.property['color.' .. name] + return tonumber(color) or color + end, __newindex = function(_, name, color) M.property['color.' .. name] = color end }) |
