aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/file_types.lua
diff options
context:
space:
mode:
Diffstat (limited to 'modules/textadept/file_types.lua')
-rw-r--r--modules/textadept/file_types.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/textadept/file_types.lua b/modules/textadept/file_types.lua
index df35f861..f0ce5bdb 100644
--- a/modules/textadept/file_types.lua
+++ b/modules/textadept/file_types.lua
@@ -65,6 +65,7 @@ local SETLEXERLANGUAGE = _SCINTILLA.properties.lexer_language[2]
local GETERROR = _SCINTILLA.properties.status[1]
-- LuaDoc is in core/.buffer.luadoc.
local function set_lexer(buffer, lang)
+ assert_type(lang, 'string/nil', 2)
if not lang then lang = detect_language(buffer) end
buffer:private_lexer_call(SETDIRECTPOINTER, buffer.direct_pointer)
buffer:private_lexer_call(SETLEXERLANGUAGE, lang)