We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 663686a commit 04086bdCopy full SHA for 04086bd
lsp-mode.el
@@ -1730,7 +1730,11 @@ Results are meaningful only if FROM and TO are on the same line."
1730
1731
(defun lsp--lens-overlay-ensure-at (pos)
1732
"Find or create a lens for the line at POS."
1733
- (or (car (cl-remove-if-not (lambda (ov) (lsp--lens-overlay-matches-pos ov pos)) lsp--lens-overlays))
+ (or (when-let ((ov (-first (lambda (ov) (lsp--lens-overlay-matches-pos ov pos)) lsp--lens-overlays)))
1734
+ (save-excursion
1735
+ (goto-char pos)
1736
+ (move-overlay ov (point-at-bol) (1+ (point-at-eol))))
1737
+ ov)
1738
(let* ((ov (save-excursion
1739
(goto-char pos)
1740
(make-overlay (point-at-bol) (1+ (point-at-eol))))))
0 commit comments