aboutsummaryrefslogtreecommitdiff
path: root/modules/lua/commands.lua
diff options
context:
space:
mode:
Diffstat (limited to 'modules/lua/commands.lua')
-rw-r--r--modules/lua/commands.lua1
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*(.+)$')