sodapopcan / vim-twiggy

Git branch management for Vim
280 stars 16 forks source link

BUG: Twiggy window resizes on NERDTreeOpen #34

Closed roblevy closed 4 years ago

roblevy commented 4 years ago

When I first open Twiggy, it occupies about a fifth or sixth of the screen.

------------------------------
T    |                       |
w    |                       |
i    |  Content              |
g    |                       |
g    |                       |
y    |                       |
     |                       |
     |                       |
------------------------------

If I then open NERDTree (:NERDTreeToggle) the NERDTree window occupies the correct amount of space, but the Twiggy window jumps to being about half the size of the screen width.

------------------------------
N    |                  | C  |
E    |                  | o  |
R    |  Twiggy          | n  |
D    |                  | t  |
T    |                  | e  |
r    |                  | n  |
e    |                  | t  |
e    |                  |    |
------------------------------

If I close NERDTree, Twiggy retains its new larger window width.

Expected behaviour

The vim-merginal plugin uses the sidebar concept similarly, but retains its narrow size when NERDTree is opened.

I would expect NERDTree to open to the left of Twiggy, and for Twiggy to retain the window width it had before NERDTree was opened.

sodapopcan commented 4 years ago

I've always been aware of this but I hardly ever work with them both open so I never bothered to look into it. I've let issues pile up quite a bit (I wasn't using Twiggy for a quite a while there and otherwise just have a lot of other things going on) but I can take a look into this.