diff options
author | 2010-11-30 17:49:07 -0500 | |
---|---|---|
committer | 2010-11-30 17:49:07 -0500 | |
commit | cd23ca3323ce3ade5e83c20bb4d921dc7d45639a (patch) | |
tree | 171ed071421096f724ce14b56d8488e751a2122e | |
parent | d955abad5f427b936393ec92028d1ef01192a8da (diff) | |
download | textadept-cd23ca3323ce3ade5e83c20bb4d921dc7d45639a.tar.gz textadept-cd23ca3323ce3ade5e83c20bb4d921dc7d45639a.zip |
Ignore shebang line when checking Lua syntax; modules/lua/commands.lua
-rw-r--r-- | modules/lua/commands.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/lua/commands.lua b/modules/lua/commands.lua index 4857126c..1d39bd2e 100644 --- a/modules/lua/commands.lua +++ b/modules/lua/commands.lua @@ -139,6 +139,7 @@ events.connect('file_before_save', local buffer = buffer buffer:annotation_clear_all() local text = buffer:get_text() + text = text:gsub('^#![^\n]+', '') -- ignore shebang line local _, err = loadstring(text) if err then local line, msg = err:match('^.-:(%d+):%s*(.+)$') |