Skip to content
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

resize_pads exits early if no padding has been initialized #187

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

haberdashPI
Copy link

Hi there, this is a simple, somewhat hacky fix for a problem I ran into when initializing Goyo.

The problem I was running into was that I had an autocmd in my .vimrc to resize the windows to be evenly split on a WinEnter event. This lead to problems that I don't quite understand where resize_pads was called within init_pads; I don't understand it because it looks like Goyo doesn't add the autocmd for resize_pads until after init_pads, but somehow this got called anyways even on a fresh start of vim.

My fix to this was just to add a flag to verify that all init_pad calls have been run; if they haven't been, resize_pad returns without resizing.

If you want to make a less hacky fix than the one I have here, I ran into this problem on neovim 0.3.1. The window resizing I am doing is somewhat indirect so that may also matter: I call a command from another plugin that happens to resize the windows in a specific way (<Plug>(repl-resize) in https://github.com/haberdashPI/vim-multi-repl).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant