summaryrefslogtreecommitdiff
path: root/lisp/speedbar.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/speedbar.el')
-rw-r--r--lisp/speedbar.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/speedbar.el b/lisp/speedbar.el
index aa09e018803..01357cb380a 100644
--- a/lisp/speedbar.el
+++ b/lisp/speedbar.el
@@ -2681,7 +2681,15 @@ Also resets scanner functions."
"Updating speedbar to special mode: %s...done"
major-mode)
(speedbar-message nil))))
- (speedbar-update-localized-contents))
+
+ ;; Update all the contents if directories change!
+ (unless (and (or (member major-mode speedbar-ignored-modes)
+ (eq af (speedbar-current-frame))
+ (not (buffer-file-name)))
+ ;; Always update for GUD.
+ (not (string-equal "GUD"
+ speedbar-initial-expansion-list-name)))
+ (speedbar-update-localized-contents)))
(select-frame af))
;; Now run stealthy updates of time-consuming items
(speedbar-stealthy-updates)))))