Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does lsp-treemacs-errors-list modify treemacs-select-window? #171

Open
AndreasMatthias opened this issue Feb 5, 2024 · 0 comments
Open

Comments

@AndreasMatthias
Copy link

Using treemacs-select-window I notice a different behavior before and after lsp-treemacs-errors-list.

Save the following file as test.el.

(package-initialize)
(treemacs)
(treemacs-select-window)
(find-file "x1.el")
(split-window-below)
(find-file "x2.el")

(defun jump ()
  (dolist (i '(1 2 3 4 5 6 7 8 9 10))
    (treemacs-select-window)
    (message "%s" (buffer-name))))

(message "=== Before lsp-treemacs-errors-list ===")
(jump)
(lsp-treemacs-errors-list)
(treemacs-quit)
(message "=== After lsp-treemacs-errors-list ===")
(jump)

Run emacs -Q -l test.el.
This is the message buffer:

=== Before lsp-treemacs-errors-list ===
 *Treemacs-Scoped-Buffer-#<frame *scratch* - GNU Emacs at home 0x5614b6bad810>*
x2.el
 *Treemacs-Scoped-Buffer-#<frame *scratch* - GNU Emacs at home 0x5614b6bad810>*
x2.el
 *Treemacs-Scoped-Buffer-#<frame *scratch* - GNU Emacs at home 0x5614b6bad810>*
x2.el
 *Treemacs-Scoped-Buffer-#<frame *scratch* - GNU Emacs at home 0x5614b6bad810>*
x2.el
 *Treemacs-Scoped-Buffer-#<frame *scratch* - GNU Emacs at home 0x5614b6bad810>*
x2.el
=== After lsp-treemacs-errors-list ===
x1.el
 *Treemacs-Scoped-Buffer-#<frame *scratch* - GNU Emacs at home 0x5614b6bad810>*
x2.el
x1.el
 *Treemacs-Scoped-Buffer-#<frame *scratch* - GNU Emacs at home 0x5614b6bad810>*
x2.el
x1.el
 *Treemacs-Scoped-Buffer-#<frame *scratch* - GNU Emacs at home 0x5614b6bad810>*
x2.el
x1.el

You see that treemacs-select-window switches between Treemacs window and x2.el window at the beginning. But this changes after running lsp-treemacs-errors-list. Now treemacs-select-window switches between all windows, i.e. Treemacs, x1.el, x2.el.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant