goolord/alpha-nvim

Alpha.nvim does not work correctly with CTRL-W T

Closed this issue · 3 comments

In vim/nvim, CTRL-W T should open a new tab with a buffer in it (see documentation for more details). However, alpha.nvim intercepts the operation, and new tab comes with alpha buffer in it.

P.S. The workaround for this seems to be pressing `CTRL-^' once the new tab is opened.

  				*CTRL-W_T*

CTRL-W T Move the current window to a new tab page. This fails if
there is only one window in the current tab page.
When a count is specified the new tab page will be opened
before the tab page with this index. Otherwise it comes after
the current tab page.

this is from the neovim docs. am i missing something? this seems like totally the expected behavior

Those are the correct docs, yes.

CTRL-W_T is similar to ":tab split". Only in "tab split", the current window both remains in the old tab and is opened in the new tab (like copy), while with CTRL-W_T, the window is closed in the old tab and is opened in the new (like move).

In both cases, when the new tab opens, we expect it to contain the existing window/buffer, not the alpha start page. And ":tab split" works that way, while CTRL-W_T does not.

Note that the original tab should have several windows in it for the CTRL-W_T to work.

the docs pretty explicitly say that it just moves the current window to a new tab page, which is exactly what i've observed it doing. if it's doing anything else for you, paste your checkhealth and a recording of you reproducing the bug with one of the debug configs https://github.com/goolord/alpha-nvim/blob/main/debug/DEBUG.md because otherwise i can't reproduce what you're talking about