aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2011-04-20 21:48:44 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2011-04-20 21:48:44 -0400
commita5eb29304fa2b41113bf0aa2144749073c3511ac (patch)
tree48f0025fc27341355a6646e650e644b463423461 /modules
parent06391f279ae54bdf09f872bc0369087fc9a2c30a (diff)
downloadtextadept-a5eb29304fa2b41113bf0aa2144749073c3511ac.tar.gz
textadept-a5eb29304fa2b41113bf0aa2144749073c3511ac.zip
Fixed bug in buffer:get_lexer(); modules/textadept/mime_types.lua
Diffstat (limited to 'modules')
-rw-r--r--modules/textadept/mime_types.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/textadept/mime_types.lua b/modules/textadept/mime_types.lua
index 0d402fd2..6d81455d 100644
--- a/modules/textadept/mime_types.lua
+++ b/modules/textadept/mime_types.lua
@@ -166,7 +166,7 @@ local function get_lexer(buffer, current)
local lexer = buffer:private_lexer_call(GETLEXERLANGUAGE)
if not current then return lexer end
local i, ws, style_at = buffer.current_pos, ws_styles[lexer], buffer.style_at
- while i > 0 and not ws[style_at[i]] do i = i - 1 end
+ if ws then while i > 0 and not ws[style_at[i]] do i = i - 1 end end
return get_style_name(buffer, style_at[i]):match('^(.+)_whitespace$') or lexer
end