Use match window opts to set initial window height #681
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use the min height of the match window as the initial height of the
ControlP window, rather than always using 1 as the starting height.
This is primarily to workaround MacVim rendering glitches triggered by
automagic resizing of windows when in non-native fullscreen mode, and
core text renderer is enabled, but doesn't seem an unreasonable default.
When MacVim is running in non-native fullscreen mode with core text
renderer enabled, automatically resizing windows causes some parts of
the screen to become blacked out. This is a known issue with MacVim...
http://vim.1045645.n5.nabble.com/Trouble-with-the-Core-Text-renderer-in-non-native-full-screen-td5713348.html
Allowing the ControlP window to open with a fixed height, by setting the
min and max match window height to the same value, makes it trivial to
work around the rendering glitches using the g:ctrlp_buffer_func option
to clear and redraw the screen when exiting the ControlP buffer, e.g.
Before this change, the only solution I could find to the need to redraw
after the ControlP window was resized to match window min height was a
fugly CursorMoved autocmd to redraw the screen the first time the cursor
moves inside the ControlP window, e.g.
This commit allows me to remove that fugly CursorMoved autocmd, which
makes me super happy :-)