summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorTJ DeVries <devries.timothyj@gmail.com>2020-09-17 08:23:19 -0400
committerTJ DeVries <devries.timothyj@gmail.com>2020-09-17 08:23:19 -0400
commitd170d6011671468985fe3d86cfbf5acb15401229 (patch)
tree51c8ccb535a196090013f8adb534a6768eedea60 /lua
parent1dc29ed14b6d1924889166b3d26666d2d9cac9fc (diff)
fix: Don't assume newlines are the reason the set broke
Diffstat (limited to 'lua')
-rw-r--r--lua/telescope/pickers.lua4
1 files 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