2

I configured magit-status to open selected buffer change hunk in other window rather then in the same window with:

    (setq magit-display-file-buffer-function
      (lambda (buffer)
        (setq current-prefix-arg t)
        (magit-display-file-buffer-traditional buffer)))

Now when I close status buffer the other window is closed as well and I assume window state is bring back to the one before magit-status was opened.

How can I keep this window and buffer open after closing magit-status window. The solution would be to prevent magit from restoring windows status before magit-status was opened.

1 Answer 1

3

Use this:

(setq magit-bury-buffer-function 'magit-mode-quit-window)

Also see the Modes and Buffers node.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.