macvim icon indicating copy to clipboard operation
macvim copied to clipboard

Vim resizing not working with window snapping tools

Open nathom opened this issue 4 years ago • 2 comments

Describe the bug When using tools like BetterSnapTool or Magnet, which let you snap windows into various sizes, the Vim window size is not conforming to the MacVim window. This leads to the bottom half of the window being unusable.

The issue doesn't happen when using mvim --clean, but it does happen with mvim and an empty .vimrc file. This probably means the issue is with something automatically loaded by MacVim.

To Reproduce Detailed steps to reproduce the behavior:

  1. Clean install MacVim
  2. Open a new instance of Vim
  3. Use a BetterSnapTool, Magnet, or anything similar to snap window to a side. Try this multiple times, dragging the mouse to different locations in the screen.
  4. The statusline and command line will be in the middle of the screen.

Expected behavior The Vim window should fill the MacVim window.

Screenshots image

Screen Recording of Issue (using BetterSnapTool)

Environment:

  • Vim version 8.2, Included patches 1-2681
  • MacOS 11.3.1
  • MacVim GUI

Additional context

mvim --startuptime logs:

nathom avatar May 21 '21 16:05 nathom

Hi sorry for late response. Since this doesn't happen with mvim --clean, do you have any specific guioption or MacVim-specific settings in your vimrc?

Also, can you show me what your MacVim configs are? You can simply run defaults read org.vim.MacVim | grep MM and copy the results.

I couldn't quite repro it but it could be due to some difference in configurations we have.

ychin avatar Jul 06 '21 22:07 ychin

The output of defaults read org.vim.MacVim | grep MM:

    MMAppearanceModeSelection = 0;
    MMAutosaveColumns = 177;
    MMAutosaveRows = 45;
    MMCurrentPreferencePane = General;
    MMLastWindowClosedBehavior = 2;
    MMNoTitleBarWindow = 0;
    MMSuppressTerminationAlert = 1;
    MMTitlebarAppearsTransparent = 1;
    MMTopLeftPoint = "{0, 900}";

Also, here is my .gvimrc:

───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: .gvimrc
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ set macligatures
   2   │ set guifont=FiraCode\ Nerd\ Font:h13
   3   │ "set guifont=SF\ Mono:h13
───────┴────────────────────────────────────────────────────────────────────────────────────────────────────────

However, after I updated to macOS 12 beta, the issue is no longer there.

nathom avatar Jul 08 '21 19:07 nathom

I think I'm going to close this for now. Unfortunately, I could not reproduce this, and seems like it's fixed for you as well. If someone else finds this issue, even if on macOS 11, feel free to comment here and I can re-investigate.

ychin avatar Sep 10 '22 23:09 ychin