diff options
| author | Jefferson González <jgmdev@gmail.com> | 2025-06-18 08:11:22 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-18 08:11:22 -0400 |
| commit | 82f7b9159aa2bed6cc5225dd4524bdd0736e5df4 (patch) | |
| tree | b375615fd1cc19b1f376d281b60ad39a74bf0c4b /data/plugins/projectsearch.lua | |
| parent | 70a507e50c65fd91fbe8932e9a46595c31ac6b40 (diff) | |
| download | pragtical-82f7b9159aa2bed6cc5225dd4524bdd0736e5df4.tar.gz pragtical-82f7b9159aa2bed6cc5225dd4524bdd0736e5df4.zip | |
projectsearch: add open tab command (#258)
This creates a separate projectsearch instance without asking
for any query text to allow tweaking the options before triggering
the search.
Diffstat (limited to 'data/plugins/projectsearch.lua')
| -rw-r--r-- | data/plugins/projectsearch.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/data/plugins/projectsearch.lua b/data/plugins/projectsearch.lua index a50e5c30..bd5de45c 100644 --- a/data/plugins/projectsearch.lua +++ b/data/plugins/projectsearch.lua @@ -1202,6 +1202,16 @@ command.add(nil, { projectsearch.toggle(path) end, + ["project-search:open-tab"] = function(path) + local rv = ResultsView(path, "", "plain") + rv:show() + core.root_view:get_active_node_default():add_view(rv) + core.add_thread(function() + core.set_active_view(rv) + rv:swap_active_child(rv.find_text) + end) + end, + ["project-search:find-plain"] = function(path) core.command_view:enter("Find Text In " .. (path or "Project"), { text = get_selected_text(), @@ -1378,6 +1388,7 @@ command.add(ResultsView, { keymap.add { ["ctrl+shift+f"] = "project-search:find", + ["ctrl+shift+alt+f"] = "project-search:open-tab", ["return"] = "project-search:refresh", ["f5"] = "project-search:refresh", ["ctrl+return"] = "project-search:replace", |
