diff options
author | 2014-11-06 10:07:56 -0500 | |
---|---|---|
committer | 2014-11-06 10:07:56 -0500 | |
commit | df8842cab01b42d8199b96bdad49266c5275da0e (patch) | |
tree | cc695c97f688d37ebe9ff61f70b4fee1536c6ec6 /core | |
parent | c085745f512aba02d01990d2ac86cb78861aa10d (diff) | |
download | textadept-df8842cab01b42d8199b96bdad49266c5275da0e.tar.gz textadept-df8842cab01b42d8199b96bdad49266c5275da0e.zip |
Use the current working directory in fileselect dialogs.
This should have been committed long ago.
Diffstat (limited to 'core')
-rw-r--r-- | core/file_io.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/file_io.lua b/core/file_io.lua index 8c861bd5..af84390e 100644 --- a/core/file_io.lua +++ b/core/file_io.lua @@ -112,7 +112,8 @@ function io.open_file(filenames) if type(filenames) == 'string' then filenames = {filenames} end filenames = filenames or ui.dialogs.fileselect{ title = _L['Open'], select_multiple = true, - with_directory = (buffer.filename or ''):match('^.+[/\\]') + with_directory = (buffer.filename or ''):match('^.+[/\\]') or + lfs.currentdir()..'/' } if not filenames then return end for i = 1, #filenames do |