diff --git a/lua/telescope/builtin/files.lua b/lua/telescope/builtin/files.lua index 2dd11c7..3d4b1bf 100644 --- a/lua/telescope/builtin/files.lua +++ b/lua/telescope/builtin/files.lua @@ -124,6 +124,8 @@ files.grep_string = function(opts) local word_match = opts.word_match opts.entry_maker = opts.entry_maker or make_entry.gen_from_vimgrep(opts) + local title_word = word:gsub("\n", "\\n") + local additional_args = {} if opts.additional_args ~= nil and type(opts.additional_args) == "function" then additional_args = opts.additional_args(opts) @@ -144,7 +146,7 @@ files.grep_string = function(opts) end pickers.new(opts, { - prompt_title = "Find Word (" .. word .. ")", + prompt_title = "Find Word (" .. title_word .. ")", finder = finders.new_oneshot_job(args, opts), previewer = conf.grep_previewer(opts), sorter = conf.generic_sorter(opts),