From d170d6011671468985fe3d86cfbf5acb15401229 Mon Sep 17 00:00:00 2001 From: TJ DeVries Date: Thu, 17 Sep 2020 08:23:19 -0400 Subject: [PATCH] fix: Don't assume newlines are the reason the set broke --- lua/telescope/pickers.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/telescope/pickers.lua b/lua/telescope/pickers.lua index 7ab903e..02f3de4 100644 --- a/lua/telescope/pickers.lua +++ b/lua/telescope/pickers.lua @@ -359,7 +359,7 @@ function Picker:find() -- This pretty much only fails when people leave newlines in their results. -- So we'll clean it up for them if it fails. - if not set_ok then + if not set_ok and display:find("\n") then display = display:gsub("\n", " | ") vim.api.nvim_buf_set_lines(results_bufnr, row, row + 1, false, {display}) end @@ -527,7 +527,7 @@ function Picker:close_windows(status) end if not pcall(vim.api.nvim_win_close, win_id, force) then - log.info("Unable to close window: ", name, "/", win_id) + log.trace("Unable to close window: ", name, "/", win_id) end end