branch: elpa/git-commit commit 1cbcc8ab19e97585564a5e6b475f49dc60a0a596 Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
magit-imenu--index-function: Strip entry counts from group titles Closes #4477. --- lisp/magit-imenu.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/magit-imenu.el b/lisp/magit-imenu.el index 64de07e..626bef1 100644 --- a/lisp/magit-imenu.el +++ b/lisp/magit-imenu.el @@ -70,6 +70,8 @@ This function is used as a helper for functions set as (parent-title (buffer-substring-no-properties (oref parent start) (1- (oref parent content))))) + (when (string-match " ([0-9]*)\\'" parent-title) + (setq parent-title (substring parent-title 0 (match-beginning 0)))) (puthash parent-title (cons (cons name (point)) (gethash parent-title entries (list)))