Skip to content

Commit

Permalink
feat: Add action when click on branch
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Jul 3, 2024
1 parent 4fa8190 commit a4e6c42
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions jcs-modeline.el
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@
(declare-function flycheck-has-current-errors-p "ext:flycheck.el")
(declare-function flycheck-count-errors "ext:flycheck.el")

(declare-function magit-branch "ext:magit-branch.el")

;;
;; (@* "Entry" )
;;
Expand Down Expand Up @@ -463,13 +465,21 @@ mouse-1: Switch project"
(tip (jcs-modeline-2str backend)))
(concat (propertize backend-icon
'mouse-face 'mode-line-highlight
'help-echo tip)
'help-echo tip
'local-map
(let ((map (make-sparse-keymap)))
(define-key map (vector 'mode-line 'mouse-1) #'magit-branch)
map))
(propertize (concat
separator
branch)
'face 'jcs-modeline-vc-face
'mouse-face 'mode-line-highlight
'help-echo tip)
'help-echo tip
'local-map
(let ((map (make-sparse-keymap)))
(define-key map (vector 'mode-line 'mouse-1) #'magit-branch)
map))
" ")))

;;
Expand Down

0 comments on commit a4e6c42

Please sign in to comment.