aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/tab-line.el28
1 files changed, 16 insertions, 12 deletions
diff --git a/lisp/tab-line.el b/lisp/tab-line.el
index ef530d43dec..5bbc45b0aae 100644
--- a/lisp/tab-line.el
+++ b/lisp/tab-line.el
@@ -520,12 +520,14 @@ the selected tab visible."
520 (add-face-text-property (point-min) (point-max) 'tab-line) 520 (add-face-text-property (point-min) (point-max) 'tab-line)
521 (if (> (vertical-motion 1) 0) 521 (if (> (vertical-motion 1) 0)
522 (let* ((point (previous-single-property-change (point) 'tab)) 522 (let* ((point (previous-single-property-change (point) 'tab))
523 (tab-prop (or (get-pos-property point 'tab) 523 (tab-prop (when point
524 (get-pos-property 524 (or (get-pos-property point 'tab)
525 (previous-single-property-change point 'tab) 'tab))) 525 (and (setq point (previous-single-property-change point 'tab))
526 (new-hscroll (seq-position strings tab-prop 526 (get-pos-property point 'tab)))))
527 (lambda (str tab) 527 (new-hscroll (when tab-prop
528 (eq (get-pos-property 1 'tab str) tab))))) 528 (seq-position strings tab-prop
529 (lambda (str tab)
530 (eq (get-pos-property 1 'tab str) tab))))))
529 (when new-hscroll 531 (when new-hscroll
530 (setq hscroll (- new-hscroll)) 532 (setq hscroll (- new-hscroll))
531 (set-window-parameter nil 'tab-line-hscroll hscroll))) 533 (set-window-parameter nil 'tab-line-hscroll hscroll)))
@@ -545,12 +547,14 @@ the selected tab visible."
545 (add-face-text-property (point-min) (point-max) 'tab-line) 547 (add-face-text-property (point-min) (point-max) 'tab-line)
546 (when (> (vertical-motion 1) 0) 548 (when (> (vertical-motion 1) 0)
547 (let* ((point (previous-single-property-change (point) 'tab)) 549 (let* ((point (previous-single-property-change (point) 'tab))
548 (tab-prop (or (get-pos-property point 'tab) 550 (tab-prop (when point
549 (get-pos-property 551 (or (get-pos-property point 'tab)
550 (previous-single-property-change point 'tab) 'tab))) 552 (and (setq point (previous-single-property-change point 'tab))
551 (new-hscroll (seq-position strings tab-prop 553 (get-pos-property point 'tab)))))
552 (lambda (str tab) 554 (new-hscroll (when tab-prop
553 (eq (get-pos-property 1 'tab str) tab))))) 555 (seq-position strings tab-prop
556 (lambda (str tab)
557 (eq (get-pos-property 1 'tab str) tab))))))
554 (when new-hscroll 558 (when new-hscroll
555 (setq hscroll (- new-hscroll)) 559 (setq hscroll (- new-hscroll))
556 (set-window-parameter nil 'tab-line-hscroll hscroll))))))))) 560 (set-window-parameter nil 'tab-line-hscroll hscroll)))))))))