Commit 1bc60511 authored by Jonas Bernoulli's avatar Jonas Bernoulli

Remember arguments used in refs buffers

parent d4a1abc3
......@@ -261,16 +261,28 @@ Type \\[magit-reset] to reset `HEAD' to the commit at point.
"committerdate" "authordate")
nil nil initial-input))
(defun magit-show-refs-get-buffer-args ()
(cond ((and magit-use-sticky-arguments
(derived-mode-p 'magit-refs-mode))
(cadr magit-refresh-args))
((and (eq magit-use-sticky-arguments t)
(--when-let (magit-mode-get-buffer 'magit-refs-mode)
(with-current-buffer it
(cadr magit-refresh-args)))))
(default-value 'magit-show-refs-arguments))))
(defun magit-show-refs-arguments ()
(if (eq magit-current-popup 'magit-show-refs-popup)
(defun magit-show-refs-popup (&optional arg)
"Popup console for `magit-show-refs'."
(interactive "P")
(magit-invoke-popup 'magit-show-refs-popup nil arg))
(let ((magit-show-refs-arguments (magit-show-refs-get-buffer-args)))
(magit-invoke-popup 'magit-show-refs-popup nil arg)))
(defun magit-show-refs-head (&optional args)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment