Skip to content

Commit 60bb6bf

Browse files
authored
fix(telescope): error when nothing is selected (#118)
Fixes: when no notification selected, either due empty notification history or filter removing all valid selection, a nil error occurred.
1 parent cd2a59f commit 60bb6bf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lua/telescope/_extensions/notify.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ local telescope_notifications = function(opts)
6464
actions.select_default:replace(function()
6565
actions.close(prompt_bufnr)
6666
local selection = action_state.get_selected_entry()
67+
if selection == nil then
68+
return
69+
end
70+
6771
local notification = selection.value
6872
local buf = vim.api.nvim_create_buf(false, true)
6973
local notif_buf = NotificationBuf(buf, notification, { config = notify._config() })

0 commit comments

Comments
 (0)