Skip to content

Commit

Permalink
fix if answer is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
desdic committed Mar 5, 2024
1 parent 49a4b18 commit dcf1e15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/telescope/_extensions/macrothis.lua
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ local delete_macro = function(prompt_bufnr)
{ prompt = "Confirm deletion? [y/n]: " },
function(confirmation)
if
string.len(confirmation) == 0
not confirmation
or string.len(confirmation) == 0
or string.sub(string.lower(confirmation), 0, 1) ~= "y"
then
print("cancelled")
Expand Down

0 comments on commit dcf1e15

Please sign in to comment.