From cd23ca3323ce3ade5e83c20bb4d921dc7d45639a Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 30 Nov 2010 17:49:07 -0500 Subject: Ignore shebang line when checking Lua syntax; modules/lua/commands.lua --- modules/lua/commands.lua | 1 + 1 file changed, 1 insertion(+) 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*(.+)$') -- cgit v1.2.3