diff options
| author | Juri Linkov | 2021-11-16 22:45:33 +0200 |
|---|---|---|
| committer | Juri Linkov | 2021-11-16 22:45:33 +0200 |
| commit | c25be3e7bb91f932a1d620bef08e16872dcf04d5 (patch) | |
| tree | 6475f072801b9332d75ebcc0764613c018bbeb45 | |
| parent | 38d905abf9eecbb1eef33c1d7df184f2f6faeeb3 (diff) | |
| download | emacs-c25be3e7bb91f932a1d620bef08e16872dcf04d5.tar.gz emacs-c25be3e7bb91f932a1d620bef08e16872dcf04d5.zip | |
* lisp/tab-bar.el (tab-bar-select-tab): Add check for wc-frame (bug#51883).
| -rw-r--r-- | lisp/tab-bar.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index 9fba70f34da..871ed1c9817 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el | |||
| @@ -1096,7 +1096,11 @@ Negative TAB-NUMBER counts tabs from the end of the tab bar." | |||
| 1096 | ;; its value of window-configuration is unreadable, | 1096 | ;; its value of window-configuration is unreadable, |
| 1097 | ;; so restore its saved window-state. | 1097 | ;; so restore its saved window-state. |
| 1098 | (cond | 1098 | (cond |
| 1099 | ((window-configuration-p wc) | 1099 | ((and (window-configuration-p wc) |
| 1100 | ;; Check for such cases as cloning a frame with tabs. | ||
| 1101 | ;; When tabs were cloned to another frame, then fall back | ||
| 1102 | ;; to using `window-state-put' below. | ||
| 1103 | (eq (window-configuration-frame wc) (selected-frame))) | ||
| 1100 | (let ((wc-point (alist-get 'wc-point to-tab)) | 1104 | (let ((wc-point (alist-get 'wc-point to-tab)) |
| 1101 | (wc-bl (seq-filter #'buffer-live-p (alist-get 'wc-bl to-tab))) | 1105 | (wc-bl (seq-filter #'buffer-live-p (alist-get 'wc-bl to-tab))) |
| 1102 | (wc-bbl (seq-filter #'buffer-live-p (alist-get 'wc-bbl to-tab))) | 1106 | (wc-bbl (seq-filter #'buffer-live-p (alist-get 'wc-bbl to-tab))) |