Skip to content

Commit f1e0fd8

Browse files
committed
Correct overlay detection, highlight the message
1 parent 8b801df commit f1e0fd8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lsp-sonarlint.el

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -500,9 +500,11 @@ Useful when exploring secondary locations, which uses an auxiliary buffer.")
500500
(lsp-sonarlint--focus-on-target focus-overlay)
501501
(lsp-sonarlint--highlight-target focus-overlay))))
502502
(when (eq (current-buffer) lsp-sonarlint--original-buffer)
503-
(when-let ((focus-overlay (seq-find (lambda (ovl) (overlay-get ovl 'lsp-sonarlint--message-overlay))
504-
(overlays-at (point)))))
505-
(lsp-sonarlint--focus-on-target (overlay-get focus-overlay 'lsp-sonarlint--message-overlay))
503+
(when-let* ((focus-overlay (seq-find (lambda (ovl) (overlay-get ovl 'lsp-sonarlint--message-overlay))
504+
(overlays-at (- (point) 1) t)))
505+
(message-overlay (overlay-get focus-overlay 'lsp-sonarlint--message-overlay)))
506+
(lsp-sonarlint--focus-on-target message-overlay)
507+
(lsp-sonarlint--highlight-target message-overlay)
506508
(hl-line-highlight))))
507509

508510

0 commit comments

Comments
 (0)