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

Magit Ediff opens two new windows and displays original window #1080

Open
kjmph opened this issue Dec 28, 2023 · 3 comments
Open

Magit Ediff opens two new windows and displays original window #1080

kjmph opened this issue Dec 28, 2023 · 3 comments
Labels

Comments

@kjmph
Copy link

kjmph commented Dec 28, 2023

When treemacs is open, running (magit-ediff) results in showing two new windows, the original editing buffer, and treemacs' sidebar when treemacs was open. So, while I expect two windows showing diff-A on the left and diff-B on the right, instead I see treemacs | buffer | diff-A | diff-B displayed. (Note, I would accept treemacs | diff-A | diff-B as an arrangement.. I just don't want to see multiple copies as if it were a three way merge)

I was able to fix this locally via:

(defun ediff-styling ()
  (pcase (treemacs-current-visibility)
    ('visible (treemacs))))
(add-hook 'ediff-before-setup-hook 'ediff-styling)

I don't know if this helps anyone else. This can be reproduced via opening treemacs and running (magit-ediff) on a buffer with edits, and then showing unstaged changes.

Copy link

stale bot commented Feb 27, 2024

This issue has been automatically marked as stale because it has not had recent activity (this bot only works as a reminder, it will not close issues).

@stale stale bot added the stale label Feb 27, 2024
@Alexander-Miller
Copy link
Owner

I cannot reproduce this on my end:

simplescreenrecorder-2024-08-11_16.24.27.mp4

My guess is that the exact behavior depends on your magit/ediff/general window settings - there is nothing special about treemacs in this regard, it's just a regular window and buffer as far as Emacs is concerned.

If you want to compare settings you can find my config here: https://github.com/Alexander-Miller/dotfiles/tree/master/.config/emacs/modules.

@stale stale bot removed the stale label Aug 11, 2024
Copy link

stale bot commented Oct 12, 2024

This issue has been automatically marked as stale because it has not had recent activity (this bot only works as a reminder, it will not close issues).

@stale stale bot added the stale label Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants