aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2016-04-06 22:29:42 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2016-04-06 22:29:42 -0400
commitac258ebb97088c01cd4be192e1255d60afce7b8b (patch)
tree8ea35a81bc9a29ecd17faf4de02b289f6bf7cfc9 /modules
parenta340aea2bd31b0f7360a597a7a6e06f37765122f (diff)
downloadtextadept-ac258ebb97088c01cd4be192e1255d60afce7b8b.tar.gz
textadept-ac258ebb97088c01cd4be192e1255d60afce7b8b.zip
Default to project root when finding in files; modules/textadept/find.lua
Diffstat (limited to 'modules')
-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 b388161c..85903bc5 100644
--- a/modules/textadept/find.lua
+++ b/modules/textadept/find.lua
@@ -250,7 +250,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('^.+[/\\]') or
+ with_directory = io.get_project_root() or
+ (buffer.filename or ''):match('^.+[/\\]') or
lfs.currentdir()
}
if not dir then return end