From 8bcdb16e18641e1cea08ebb614d70d98a3c27426 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 26 Sep 2011 18:11:57 -0400 Subject: Lua code cleanup. --- modules/textadept/run.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'modules/textadept/run.lua') 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 --- -- cgit v1.2.3