summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorLuke Kershaw <35707277+l-kershaw@users.noreply.github.com>2022-01-06 13:44:39 +0000
committerGitHub <noreply@github.com>2022-01-06 13:44:39 +0000
commit948f5adff28928d21207035035c0827c9ad92cbc (patch)
tree196d65ec7db5136b3ab449d2f7390224228fcfc6 /lua
parentf285599440fcdbf97a7f44d120d403c80316f576 (diff)
fix: allow `selection_caret` to be entirely whitespace (#1660)
Diffstat (limited to 'lua')
-rw-r--r--lua/telescope/pickers/highlights.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/lua/telescope/pickers/highlights.lua b/lua/telescope/pickers/highlights.lua
index 3ac6510..944d02c 100644
--- a/lua/telescope/pickers/highlights.lua
+++ b/lua/telescope/pickers/highlights.lua
@@ -65,6 +65,7 @@ function Highlighter:hi_sorter(row, prompt, display)
end
function Highlighter:hi_selection(row, caret)
+ caret = vim.F.if_nil(caret, "")
local results_bufnr = assert(self.picker.results_bufnr, "Must have a results bufnr")
a.nvim_buf_clear_namespace(results_bufnr, ns_telescope_selection, 0, -1)