aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2016-04-26 18:05:33 -0400
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2016-04-26 18:05:33 -0400
commitf08507f558d2cc7444c7caa9a99d5276685b33f2 (patch)
tree1c9d0401219b9073924fe206123eef0828ad2671
parent28b99868e1d2861c8dfbc19024ef7c145a37809e (diff)
Handle non-existent compile/run commands gracefully; modules/textadept/menu.lua
-rw-r--r--modules/textadept/menu.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/textadept/menu.lua b/modules/textadept/menu.lua
index 4e7cc785..e8f7983b 100644
--- a/modules/textadept/menu.lua
+++ b/modules/textadept/menu.lua
@@ -182,7 +182,7 @@ local default_menubar = {
-- Compare the base run/compile command with the one for the current
-- file. The difference is any additional arguments set previously.
base_commands[i] = commands[buffer.filename:match('[^.]+$')] or
- commands[buffer:get_lexer()]
+ commands[buffer:get_lexer()] or ''
local current_command = (commands[buffer.filename] or '')
local args = current_command:sub(#base_commands[i] + 2)
utf8_args[i] = args:iconv('UTF-8', _CHARSET)