-
-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Window contents shift when toggling horizontal terminals #417
Comments
Hi @brdoney thanks for recommending this, I think some time ago in the earliest days of this plugin when it was a vimscript file in my dotfiles I did have something like this in place but there wasn't a lua equivalent so it got dropped. I'm definitely open to having this added if it does indeed work as intended. Would be good to have some sort of before and after imagery/gif. I think it's also worth noting that |
I forgot about
I'll give a quick implementation a shot this weekend and post some gifs of the current behaviour, the |
@brdoney if your issue is the same as the OP's i.e. specific to horizontal windows then please have a look at the The file explorer is not special it doesn't get any special treatment and this is how neovim behaves when a window is split vertically. I don't know a way that doesn't involve a multitude of hacks to resolve this. If you or anyone else has a solution please feel free to PR 🙏🏾 otherwise we will all just have to live with it. |
To anyone reading, the "text gets chopped off after resizing" issue - I think with Neovim nightly this was fixed. See "neovim reflow", this pull request - neovim/neovim#21124 |
I migrated over to this plugin from vim-terminal-help because I love switching terminals from the horizontal to floating directions on the fly. However, one difference that I noticed is that when I open/close a horizontal terminal, the contents of splits are shifted accordingly. I find this a bit distracting.
To give some more concrete information, the way that vim-terminal-help gets around this is by calling
windo winsaveview
andwindo winrestview
before and after the terminal opens/closes, respectively. That way, any shifts from opening or closing the terminal split are undone after they occur.This seems like a simple change, so I would be happy to implement it if the shifting isn't intentional! I do wonder if the change would also make sense for the vertical layout too.
The text was updated successfully, but these errors were encountered: