akinsho / toggleterm.nvim

A neovim lua plugin to help easily manage multiple terminal windows
GNU General Public License v3.0
4.21k stars 170 forks source link

[BUG] <title> #500

Closed dpetka2001 closed 10 months ago

dpetka2001 commented 11 months ago

Is there an existing issue for this?

Current Behavior

Currently, when opening a terminal from an existing Neovim window with either :ToggleTerm direction=vertical or :ToggleTerm direction=horizontal the terminal open correctly either vertically or horizontally. When you open a terminal in a tab with :ToggleTerm direction=tab and then try to spawn 2 different terminals horizontally and vertically, the behavior is inverted. So, in the new tab with already opened terminal, if you do :2ToggleTerm direction=horizontal it creates a vertical terminal and :3ToggleTerm direction=vertical creates a horizontal terminal. I'm not sure if this is intended behavior or not.

Expected Behavior

When opening the first terminal in a tabpage, the subsequent spawned terminals should conform to the direction used by the user.

Steps To Reproduce

  1. nvim test.lua
  2. :ToggleTerm direction=tab
  3. :2ToggleTerm direction=vertical opens terminal below
  4. :3ToggleTerm direction=horizontal opens terminal on the right So no1 terminal is on the left, no2 terminal is below no1 and no3 opens vertically next to no2. The correct order I believe should be no1 on the left, no2 on the right of no1 and no3 below no2.

Environment

- OS: Linux Mint 21.1
- neovim version: v0.10.0-dev-4eea609
- Shell: fish

Anything else?

No response

akinsho commented 10 months ago

The behaviour of tab terminals does not include opening several sub terminals in that same tab especially if there is no other buffer in that window, there are a few existing issues open already based around improving the behaviour of tab terminals. Ultimately this needs input/time contributed by someone invested in this. I never use tab terminal this way and don't have a lot of time to dedicate to solving this. I'll close this as a duplicate as I believe it's essentially captured elsewhere.