emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/gited fac8958 03/73: gited-list-branches: Move to curre


From: Stefan Monnier
Subject: [elpa] externals/gited fac8958 03/73: gited-list-branches: Move to current branch only when it's shown
Date: Sun, 29 Nov 2020 00:00:27 -0500 (EST)

branch: externals/gited
commit fac8958656a7e8a0277342ec3210071641bf2aaa
Author: Tino Calancha <tino.calancha@gmail.com>
Commit: Tino Calancha <tino.calancha@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.
---
 gited.el | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/gited.el b/gited.el
index 86e2eb4..0f91912 100644
--- a/gited.el
+++ b/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)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]