summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.el3
-rw-r--r--lisp/km-magit.el9
2 files changed, 12 insertions, 0 deletions
diff --git a/init.el b/init.el
index 1c865be..795a073 100644
--- a/init.el
+++ b/init.el
@@ -922,6 +922,9 @@
(magit-define-popup-action 'magit-log-popup
?e "Edit options" 'magit-log-refresh-popup)
+ (magit-define-popup-action 'magit-log-refresh-popup
+ ?m "Modify range" 'km/magit-log-modify-range)
+
(magit-change-popup-key 'magit-branch-popup :action
?c ?o)
(magit-change-popup-key 'magit-branch-popup :action
diff --git a/lisp/km-magit.el b/lisp/km-magit.el
index d4b89f2..4fed9c0 100644
--- a/lisp/km-magit.el
+++ b/lisp/km-magit.el
@@ -594,6 +594,15 @@ show tags by default."
((derived-mode-p 'magit-cherry-mode)
(call-interactively #'km/magit-cherry-flip-revs))))
+(defun km/magit-log-modify-range ()
+ "Change range for current log buffer."
+ (interactive)
+ (unless (derived-mode-p 'magit-log-mode)
+ (user-error "Not in log buffer"))
+ (setf (caar magit-refresh-args)
+ (read-string "Range: " (caar magit-refresh-args)))
+ (magit-refresh))
+
(defun km/magit-cherry-insert-in-upstream ()
(insert ?\n)
(magit-insert-section (cherries)