emacs-lsp / lsp-mode

Emacs client/library for the Language Server Protocol
https://emacs-lsp.github.io/lsp-mode
GNU General Public License v3.0
4.79k stars 890 forks source link

Headerline breadcrumbs are shared across all windows within a frame #3902

Closed trillioneyes closed 1 year ago

trillioneyes commented 1 year ago

Thank you for the bug report

Bug description

When lsp-headerline-breadcrumb mode is on in multiple windows, navigating between symbols in a file updates breadcrumbs for all windows in the current frame instead of just the current window.

Steps to reproduce

Create a project with the following files:

src/repro1.clj:

(ns repro1)

(def monad 10)

src/repro2.clj:

(ns repro2)

(def dyad 20)

Open each file in its own window.

In either file, navigate into one of the def forms.

Expected behavior

The repro1.clj window's headerline displays src/repro1.clj and the repro2.clj window's headerline displays src/repro2.clj.

Which Language Server did you use?

lsp-clojure

OS

Linux

Error callstack

No response

Anything else?

I think this was introduced in https://github.com/emacs-lsp/lsp-mode/pull/3856.

yyoncho commented 1 year ago

I think that we already have that reported and the fix was not trivial.

trillioneyes commented 1 year ago

Do you have a link to the issue? I searched "header" and "breadcrumb" and couldn't find it.

Ghibranalj commented 1 year ago

Can confirm the issue. its happening to me too with c/c++ and clangd.

edit: i can also confirm that the problem did not exist before #3856. I pinned my lsp-mode to the commit before this PR is merged and the issue is gone.

i use doom emacs' (package!) macro

(package! lsp-mode  :pin "3939ff59227186c6574d1f0b1b8153dae3299d51")
yyoncho commented 1 year ago

Fixed with https://github.com/emacs-lsp/lsp-mode/pull/4018