Closed mario-grgic closed 1 year ago
Huh, I'll need to test this in a VM because as you said it does work in macOS 13 Ventura. Just to be clear, set fu
still works, just outside of VimEnter
right? Or does set fu
not work at all for you?
Also, are you using native or non-native full screen?
but the full screen behaviour is quite jarring and not smooth.
What do you mean by this by the way?
Yes, set fu
works ordinarily, just not from VIMEnter
event (well only occasionally). I am using native full screen.
but the full screen behaviour is quite jarring and not smooth.
What do you mean by this by the way?
If you run set fu
directly in .gvimrc, the OS seems to run its own window opening animation (i.e. window growing from small rectangle to final window size), which is then interrupted by full screen animation somewhere in the middle. The full screen animation is also not rendering all frames, only the final few frames are rendered and it looks jarring.
If you run set fu
from VimEnter
event, both animations are run smoothly and fully in order , first window opening animation, followed full screen animation. This takes longer too but is smoother and less jarring.
Alright found the bug. It was introduced when merging from upstream and resolving merge conflicts. It's a little annoying because it relies on the specifics of the compiler in order to show up (the code was reading the wrong C union value if you were curious), so I'm glad you somehow found the case that did expose the bug. The full repro was actually just set diff
followed by set fu
, no need for VimEnter
autocmds.
The fix should be merged shortly.
I can confirm this is fixed.
Thank you for finding and fixing it so quickly. That is a very subtle bug.
Steps to reproduce
I am building MacVim from git source pretty regularly with huge features enabled on Catalina (macOS 10.15.7) with XCode 12.1 and Ventura (macOS 13.2.1) with XCode 14.1.
I have the following code in my .gvimrc that enters full screen in diff mode and equalizes the sizes of side by side windows:
This used to work for over 15 years now, until it got broken very recently. It works fine in MacVim r176, patch level 1298:
but stops working in patch level 1365.
Note that it works on Ventura but not on Catalina.
On Catalina you get erratic behavior where once in a while it will enter the full screen mode, but most of the time it will not.
Note that the function is always called (tested it with debug messages) and the fullscreen mode is set
:set fu?
printsfullscreen
.Of course you could solve this problem but not using VimEnter event at all and just entering full screen mode always in diff mode, but the full screen behaviour is quite jarring and not smooth.
Expected behaviour
MacVim should enter full screen mode.
Version of Vim and architecture
9.0.1365 x86_64
Environment
macOS 10.15.7 mac Terminal.app xterm-256color GNU bash, version 5.2.15(1)-release (x86_64-apple-darwin19.6.0)
How MacVim was installed
Built form git
Logs and stack traces
No response
Vim configuration where issue is reproducable
No response
Issue has been tested with given configuration
Issue has been tested with no configuration
mvim --clean
(orgvim
, supplied by MacVim distribution)vim --clean
(in terminal, supplied by MacVim distribution)vim --clean
(in terminal, other suppliers, e.g. /usr/bin/vim)Other conditions