summaryrefslogtreecommitdiff
path: root/lisp/speedbar.el
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2012-03-10 15:58:54 +0800
committerChong Yidong <cyd@gnu.org>2012-03-10 15:58:54 +0800
commit570a1714808328275b04cb3d9a10cb7f7355c70e (patch)
tree5e3768119d7335a8144f3b7d98713f12bcb29bfd /lisp/speedbar.el
parent1de11f569d38d9c7be17783776e405a4434e1a68 (diff)
downloademacs-570a1714808328275b04cb3d9a10cb7f7355c70e.tar.gz
Fix speedbar highlighting bug.
* lisp/speedbar.el (speedbar-unhighlight-one-tag-line): Avoid unhighlighting due to frame switching. Fixes: debbugs:10275
Diffstat (limited to 'lisp/speedbar.el')
-rw-r--r--lisp/speedbar.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/speedbar.el b/lisp/speedbar.el
index 89211b2b86e..bb1debb4552 100644
--- a/lisp/speedbar.el
+++ b/lisp/speedbar.el
@@ -3987,11 +3987,11 @@ TEXT is the buffer's name, TOKEN and INDENT are unused."
(defun speedbar-unhighlight-one-tag-line ()
"Unhighlight the currently highlighted line."
- (if speedbar-highlight-one-tag-line
- (progn
- (speedbar-delete-overlay speedbar-highlight-one-tag-line)
- (setq speedbar-highlight-one-tag-line nil)))
- (remove-hook 'pre-command-hook 'speedbar-unhighlight-one-tag-line))
+ (when (and speedbar-highlight-one-tag-line
+ (not (eq this-command 'handle-switch-frame)))
+ (speedbar-delete-overlay speedbar-highlight-one-tag-line)
+ (setq speedbar-highlight-one-tag-line nil)
+ (remove-hook 'pre-command-hook 'speedbar-unhighlight-one-tag-line)))
(defun speedbar-recenter-to-top ()
"Recenter the current buffer so point is on the top of the window."