Skip to content

Commit 2300e94

Browse files
committed
[lsp-ui-peek] Populate lsp--buffer-workspaces if target buffer is in an indeterminate state
1 parent 6f185d7 commit 2300e94

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lsp-ui-peek.el

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -494,17 +494,17 @@ XREFS is a list of references/definitions."
494494
(forward-line line)
495495
(forward-char column))
496496
(point-marker)))))
497-
(current-workspace lsp--cur-workspace))
497+
(cur-buffer-workspaces (and (boundp 'lsp--buffer-workspaces) lsp--buffer-workspaces)))
498498
(if other-window
499499
(pop-to-buffer (marker-buffer marker) t)
500500
(switch-to-buffer (marker-buffer marker)))
501501
(with-current-buffer buffer
502502
(lsp-ui-peek-mode -1))
503-
(unless lsp--cur-workspace
504-
(setq lsp--cur-workspace current-workspace))
505-
(unless lsp-mode
503+
(unless lsp--buffer-workspaces
504+
(setq lsp--buffer-workspaces cur-buffer-workspaces)
506505
(lsp-mode 1)
507-
(lsp-on-open))
506+
(dolist (workspace cur-buffer-workspaces)
507+
(lsp--open-in-workspace workspace)))
508508
(goto-char marker)
509509
(run-hooks 'xref-after-jump-hook))))
510510
(lsp-ui-peek--toggle-file)))

0 commit comments

Comments
 (0)