goolord / alpha-nvim

a lua powered greeter like vim-startify / dashboard-nvim
MIT License
1.78k stars 104 forks source link

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

Closed j-xella closed 1 year ago

j-xella commented 1 year ago

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.

goolord commented 1 year ago
                  *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

j-xella commented 1 year ago

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.

goolord commented 1 year ago

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