Skip to content

Commit 1f1d4be

Browse files
authored
`lsp-avy-lens': don't error if no lens is selected (#2337)
`avy-process' can return nil if the user cancels (e.g. by pressing ESC). In that case, `funcall-interactively' calling the result would throw an error. Guard the `funcall-interactively', removing the error. The relevant part in `avy-process' is "(eq res 'abort) nil".
1 parent 8f1edd5 commit 1f1d4be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lsp-lens.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ CALLBACK - callback for the lenses."
408408
(--map (overlay-put it 'before-string
409409
(overlay-get it 'lsp-original))
410410
lsp-lens--overlays))))))
411-
(funcall-interactively action))))
411+
(when action (funcall-interactively action)))))
412412

413413
(provide 'lsp-lens)
414414
;;; lsp-lens.el ends here

0 commit comments

Comments
 (0)