aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/mime_types.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2011-03-17 17:41:02 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2011-03-17 17:41:02 -0400
commita1179904c022d6ccd22ebd00a4db2618a9d9ca34 (patch)
tree825bae061b80facf01a5fbf921e9120042c4211c /modules/textadept/mime_types.lua
parent8f061a7148266ce8d4a05459f7de680a47b8899e (diff)
downloadtextadept-a1179904c022d6ccd22ebd00a4db2618a9d9ca34.tar.gz
textadept-a1179904c022d6ccd22ebd00a4db2618a9d9ca34.zip
Performance and speed improvements.
Diffstat (limited to 'modules/textadept/mime_types.lua')
-rw-r--r--modules/textadept/mime_types.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/textadept/mime_types.lua b/modules/textadept/mime_types.lua
index f642e3ed..0d402fd2 100644
--- a/modules/textadept/mime_types.lua
+++ b/modules/textadept/mime_types.lua
@@ -147,9 +147,9 @@ local function set_lexer(buffer, lang)
if ws_styles[lang] then return end
-- Create the ws_styles[lexer] lookup table for get_lexer().
- local ws, find = {}, string.find
+ local ws = {}
for i = 0, 255 do
- ws[i] = find(get_style_name(buffer, i), 'whitespace') and true or false
+ ws[i] = buffer:private_lexer_call(i):find('whitespace') ~= nil
end
ws_styles[lang] = ws
end