branch: scratch/gited commit 843b867b56e0e730204ed13788fdd2876c088027 Author: Tino Calancha <tino.calan...@gmail.com> Commit: Tino Calancha <tino.calan...@gmail.com>
gited-list-branches: Move to current branch only when it's shown * gited.el (gited-list-branches): Move point to `gited-current-branch' only when it's shown in the gited buffer. --- packages/gited/gited.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/gited/gited.el b/packages/gited/gited.el index 86e2eb4..0f91912 100644 --- a/packages/gited/gited.el +++ b/packages/gited/gited.el @@ -10,9 +10,9 @@ ;; Compatibility: GNU Emacs: 24.4 ;; Version: 0.2.0 ;; Package-Requires: ((emacs "24.4") (cl-lib "0.5")) -;; Last-Updated: Fri Jun 02 11:10:51 JST 2017 +;; Last-Updated: Fri Jun 02 15:53:47 JST 2017 ;; By: calancha -;; Update #: 635 +;; Update #: 636 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; @@ -3157,8 +3157,11 @@ in the active region." (setq buffer-invisibility-spec (list t))) (gited-tabulated-list-entries) (tabulated-list-print) - (gited-goto-branch gited-current-branch) - (gited-fontify-current-branch) + ;; Go to `gited-current-branch' when it is shown. + (when (assoc gited-current-branch + (mapcar (lambda (x) (cdr (cddr x))) gited-branch-alist)) + (gited-goto-branch gited-current-branch) + (gited-fontify-current-branch)) (unless gited--hide-details-set (or gited-verbose (gited-hide-details-mode 1)) (setq gited--hide-details-set t)))))