aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/run.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2011-09-26 18:11:57 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2011-09-26 18:11:57 -0400
commit8bcdb16e18641e1cea08ebb614d70d98a3c27426 (patch)
treeda922f622a6a03a875625f8905c3fbcb129e8aad /modules/textadept/run.lua
parentc2d73d4284cc5009128bc5fed68fcc5826336ea2 (diff)
downloadtextadept-8bcdb16e18641e1cea08ebb614d70d98a3c27426.tar.gz
textadept-8bcdb16e18641e1cea08ebb614d70d98a3c27426.zip
Lua code cleanup.
Diffstat (limited to 'modules/textadept/run.lua')
-rw-r--r--modules/textadept/run.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/textadept/run.lua b/modules/textadept/run.lua
index 34171ce2..567178fb 100644
--- a/modules/textadept/run.lua
+++ b/modules/textadept/run.lua
@@ -68,9 +68,8 @@ local function command(cmd_table)
if not buffer.filename then return end
buffer:save()
local action = cmd_table[buffer.filename:match('[^.]+$')]
- if action then
- return execute(type(action) == 'function' and action() or action)
- end
+ if not action then return end
+ return execute(type(action) == 'function' and action() or action)
end
---