aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/find.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2014-11-06 10:07:56 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2014-11-06 10:07:56 -0500
commitdf8842cab01b42d8199b96bdad49266c5275da0e (patch)
treecc695c97f688d37ebe9ff61f70b4fee1536c6ec6 /modules/textadept/find.lua
parentc085745f512aba02d01990d2ac86cb78861aa10d (diff)
downloadtextadept-df8842cab01b42d8199b96bdad49266c5275da0e.tar.gz
textadept-df8842cab01b42d8199b96bdad49266c5275da0e.zip
Use the current working directory in fileselect dialogs.
This should have been committed long ago.
Diffstat (limited to 'modules/textadept/find.lua')
-rw-r--r--modules/textadept/find.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua
index bde8dfa5..8aacfcb3 100644
--- a/modules/textadept/find.lua
+++ b/modules/textadept/find.lua
@@ -225,7 +225,8 @@ end
function M.find_in_files(dir)
dir = dir or ui.dialogs.fileselect{
title = _L['Find in Files'], select_only_directories = true,
- with_directory = (buffer.filename or ''):match('^.+[/\\]'),
+ with_directory = (buffer.filename or ''):match('^.+[/\\]') or
+ lfs.currentdir()..'/'
}
if not dir then return end