opts.default_text used when passed in SearchNotes for default_text

This commit is contained in:
Jacob Pierce
2022-01-21 15:46:41 -08:00
parent 6bb9b72ed4
commit 19c5282943

View File

@@ -1587,7 +1587,7 @@ local function SearchNotes(opts)
prompt_title = "Search in notes", prompt_title = "Search in notes",
cwd = M.Cfg.home, cwd = M.Cfg.home,
search_dirs = { M.Cfg.home }, search_dirs = { M.Cfg.home },
default_text = vim.fn.expand("<cword>"), default_text = opts.default_text or vim.fn.expand("<cword>"),
find_command = M.Cfg.find_command, find_command = M.Cfg.find_command,
attach_mappings = function(_, map) attach_mappings = function(_, map)
actions.select_default:replace(picker_actions.select_default) actions.select_default:replace(picker_actions.select_default)