Commit ac9acc18 authored by Juri Linkov's avatar Juri Linkov

Use quit-restore-window to close tab (bug#39446)

* lisp/tab-bar.el (display-buffer-in-new-tab): New function with code
from display-buffer-in-tab.
(display-buffer-in-tab): Call display-buffer-in-new-tab.
(switch-to-buffer-other-tab): Instead of 'display-buffer-same-window'
use '(reusable-frames . t)'.

* lisp/windmove.el (windmove-display-in-direction): Set arg 'type'
to 'tab' for window--display-buffer when creating a new tab.

* lisp/window.el (quit-restore-window): Call tab-bar-close-tab
when quit-restore type is 'tab'.
(display-buffer-record-window): Set window-parameter 'quit-restore'
to 'tab' for type 'tab'.
(window--display-buffer): Set window-prev-buffers to nil for tab too.
parent 5e7bead8
Pipeline #4771 passed with stage
in 53 minutes and 43 seconds