-
-
Notifications
You must be signed in to change notification settings - Fork 686
Support guioptions 'k' flag in MacVim, prevents unnecessary window re… #708
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
Conversation
…size Adds support for native GVim's 'k' flag. Adding/removing tabs/scrollbars and setting 'linespace'/'columnspace' would now cause the number of lines and columns in the buffer change to keep the window size constant, instead of the other way round of resizing the window to keep the view size constant. This helps prevent the window from resizing itself unncessarily, which could be especially annoying when the window is pinned/maximized. Manually setting 'lines'/'columns', going to full screen, dragging the window corner to resize would still resize the window. Also removed misc calls within MMWindowController.m that were setting shouldResizeVimView. Those calls were already handled by native Vim's gui.c's gui_set_shellsize so it's redundant. Close macvim-dev#617
I couldn't quite find any unit tests specific to MacVim in the repo (raw Vim has the src/testdir which has a collection of Vim scripts for unit tests). If I missed that I can add unit tests for this functionality as well. |
Ok. Feel free to revert the change. I'll try to look into the issue and submit a proper fix. The way the messages got bounced when resizing windows involved quite a few roundtrips, and it's possible I missed some cases since I didn't test on another monitor. |
Also @ichizok how does guioptions-k not work for you? Can you give a more detailed set of repro steps? I'm curious as it could be related why it's causing issues. |
Repro steps Start MacVim with GUI: Set :set go+=k
:set go+=T Expected: Shows toolbar, and window size (height) does not change. MacVim: My understanding is that the following GVim (linux) is the correct behavior. GVim (on Ubuntu): |
Ah yes, right. I think there's actually a bug in that toolbars don't work, but scrollbars / linespace / tabs do work. I will fix that case as well in the second version of this pull request later. |
…size
Adds support for native GVim's 'k' flag. Adding/removing tabs/scrollbars
and setting 'linespace'/'columnspace' would now cause the number of
lines and columns in the buffer change to keep the window size constant,
instead of the other way round of resizing the window to keep the view
size constant. This helps prevent the window from resizing itself
unncessarily, which could be especially annoying when the window is
pinned/maximized.
Manually setting 'lines'/'columns', going to full screen, dragging the
window corner to resize would still resize the window.
Also removed misc calls within MMWindowController.m that were setting
shouldResizeVimView. Those calls were already handled by native Vim's
gui.c's gui_set_shellsize so it's redundant.
Close #617