From e8482636ecf376b5f32b1fd04317485105b6b7ee Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 6 Aug 2007 13:24:46 -0400 Subject: Fixed bug with opening files via command line arguments; init.lua When the path to the Textadept executable is not specified, base_dir is nil. Attempting to concat it with a filename throws an error, so base_dir defaults to the empty string. --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index b6b34129..88124aad 100644 --- a/init.lua +++ b/init.lua @@ -13,7 +13,7 @@ local textadept = textadept if #arg == 0 then textadept.io.load_session() else - local base_dir = arg[0]:match('^.+/') + local base_dir = arg[0]:match('^.+/') or '' for _, filename in ipairs(arg) do textadept.io.open(base_dir..filename) end -- cgit v1.2.3