Skip to content

Commit 1f4f76c

Browse files
committed
feat: use distinct filter prompt titles
1 parent 3b41f0d commit 1f4f76c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

lua/neo-tree/sources/filesystem/lib/filter.lua

+10-2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,20 @@ M.show_filter = function(state, search_as_you_type, fuzzy_finder_mode)
1919
local winid = vim.api.nvim_get_current_win()
2020
local height = vim.api.nvim_win_get_height(winid)
2121
local scroll_padding = 3
22+
local popup_msg = "Search:"
23+
if search_as_you_type then
24+
if fuzzy_finder_mode == "directory" then
25+
popup_msg = "Filter Directories:"
26+
else
27+
popup_msg = "Filter:"
28+
end
29+
end
2230
if state.current_position == "float" then
2331
scroll_padding = 0
2432
local width = vim.fn.winwidth(winid)
2533
local row = height - 2
2634
vim.api.nvim_win_set_height(winid, row)
27-
popup_options = popups.popup_options("Enter Filter Pattern:", width, {
35+
popup_options = popups.popup_options(popup_msg, width, {
2836
relative = "win",
2937
winid = winid,
3038
position = {
@@ -36,7 +44,7 @@ M.show_filter = function(state, search_as_you_type, fuzzy_finder_mode)
3644
else
3745
local width = vim.fn.winwidth(0) - 2
3846
local row = height - 3
39-
popup_options = popups.popup_options("Enter Filter Pattern:", width, {
47+
popup_options = popups.popup_options(popup_msg, width, {
4048
relative = "win",
4149
winid = winid,
4250
position = {

0 commit comments

Comments
 (0)