macvim icon indicating copy to clipboard operation
macvim copied to clipboard

Gvimdiff window opens one or two columns smaller every time it is opened

Open JamesSassano opened this issue 2 months ago • 4 comments

Steps to reproduce

  1. From a terminal type gvimdiff A B (files do not need to exist)
  2. From gvim type :echo winwidth(0)
  3. Note the value
  4. Close gvim
  5. From a terminal type gvimdiff A B
  6. From gvim type :echo winwidth(0)
  7. Note the value is less than the previous value

Expected behaviour

Expect the newly opened window to be the same size as the previously closed window.

Version of MacVim

MacVim r181 (Vim 9.1.1128)

MacVim installation method

brew install macvim

Environment

macOS: 15.7.1 (24G231) mac: MacBook Pro M4 terminal: Version 2.14 (455.1)

Logs and stack traces


Vim and MacVim configuration where issue is reproducable

No response

How was MacVim launched?

  • [ ] by launching MacVim.app in macOS (by using the Dock, Spotlight, or the open command)
  • [x] by running mvim/gvim in the terminal

Issue has been tested with clean configuration

  • [ ] by running mvim --clean (or gvim, supplied by MacVim distribution). You can also use the File → "New Clean Window" menu item within MacVim.
  • [x] by running vim --clean (in terminal, supplied by MacVim distribution)
  • [ ] by running vim --clean (in terminal, other suppliers, e.g. /usr/bin/vim)

JamesSassano avatar Oct 09 '25 15:10 JamesSassano

Hi, do you mind answering the following:

  1. What are your MacVim settings? You can show this by doing defaults read org.vim.MacVim | grep MM.
  2. What does set guioptions? show?
  3. What resolution are you using?

ychin avatar Oct 09 '25 22:10 ychin

I was unable to reproduce neither on MacVim r181.2 (Vim 9.1.1577) nor MacVim r181 (Vim 9.1.1128) with --clean and without it.

macOS tested: 12.7.6

my guioptions are gmrLk.

my defaults are:

    MMAutosaveColumns = 199;
    MMAutosaveRows = 53;
    MMCurrentPreferencePane = Advanced;
    MMLastUsedBundleVersion = "181.2";
    MMNoTitleBarWindow = 0;
    MMRenderer = 1;
    MMSmoothResize = 1;
    MMTitlebarAppearsTransparent = 0;
    MMTopLeftPoint = "{56, 919}";
    MMUpdaterPrereleaseChannel = 1;

eirnym avatar Oct 10 '25 07:10 eirnym

  1. What are your MacVim settings? You can show this by doing defaults read org.vim.MacVim | grep MM.
# Gvim application closed
$ defaults read org.vim.MacVim | grep MM
    MMAutosaveColumns = 110;
    MMAutosaveRows = 65;
    MMLastUsedBundleVersion = 181;
    MMTopLeftPoint = "{843, 1079}";
$ gvimdiff A B
2 files to edit
# Without closing the window
$ defaults read org.vim.MacVim | grep MM
    MMAutosaveColumns = 107;
    MMAutosaveRows = 65;
    MMLastUsedBundleVersion = 181;
    MMTopLeftPoint = "{843, 1079}";

It seems like it changes the MMAutosaveColumns on gvim open.

  1. What does set guioptions? show?
guioptions=egmrLk
  1. What resolution are you using?

Default 1728x1117

JamesSassano avatar Oct 10 '25 14:10 JamesSassano

I can reproduce this. Seems to be an issue with how the scrollbars are handled when launching MacVim with vertically split panes which makes it not work with the guioptions+=k part which is supposed to keep the window size the same. I may have to punt till the next release since I'm trying to get it out and this seems a relatively minor bug.

ychin avatar Oct 11 '25 07:10 ychin