aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2007-08-06 13:24:46 -0400
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2007-08-06 13:24:46 -0400
commite8482636ecf376b5f32b1fd04317485105b6b7ee (patch)
treeb31c222280a9ce46d917db79a8a5ad19e0aee817
parent9cb58b78ef4f67201f3ff2b506307292fde8560a (diff)
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.
-rw-r--r--init.lua2
1 files changed, 1 insertions, 1 deletions
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