Allows smooth resizing of MacVim's window by ychin · Pull Request #1276 · macvim-dev/macvim
added
the
UI
label
Sep 10, 2022
ychin
mentioned this pull request
ychin
mentioned this pull request
1 task
ychin
mentioned this pull request
Adds a setting that allows for smoothly resizing the window. Previously, MacVim would only allow resizing in fixed increment of the grid size and snap to such sizes. This was a little more consistent with how terminals tend to work, and allows for optimal window sizing, and it was also an artifact of the old MacVim renderer where it didn't have a stateful renderer that could repaint the text view. The snapping could be jarring for users more used to modern text editors which allow for smoothly resizing of the window though, and it makes third party tools that could snap macOS windows to the side not work properly as there's usually a gap near the bottom. With guioption-k, MacVim already allows for decoupling the window size from the Vim's grid size anyway, so adding smooth resizing allows to work much better under those assumptions. In addition to allowing smooth resizing, this change also makes it so that the CoreText renderer will fill to the right a little bit when rendering the rightmost column when MacVim's window size isn't exactly the Vim grid size. Previously, if a color scheme has NonText color (e.g. desert), or the user has 'cursorline' set, smooth resize (or in full screen or guioption-k) would leave a gap to the right, looking a little ugly. This allows the last column's to fully fill to the right, resulting in a much more consistent look when resizing the window. Close macvim-dev#948
ychin
deleted the
smooth-resize-window
branch
ychin
mentioned this pull request
ychin added a commit that referenced this pull request
Sep 15, 2022Updated to Vim 9.0.472. Announcements ==================== Sponsors -------------------- MacVim now allows you to sponsor the team! Any amount would be appreciated and it is of course optional. See the announcement (#1271) for more details. Supporting old versions of macOS (10.12 or below) -------------------- Currently, macOS supports macOS 10.9 or above. However, this is getting harder to do so as time goes on (e.g. the latest Xcode doesn't support building for it). In the near future, MacVim will mostly target 10.13 (High Sierra) or above, with 10.9 - 10.12 as legacy support. Visit this discussion (#1288) if you would be affected and would like to know more. Features ==================== Resizing MacVim new options -------------------- You can now smoothly drag and resize MacVim without having it constrained to fixed multiples of the text size, by setting the "Smoothly resizes window" under General preference pane. This also allows MacVim to behave better when used with third-party tools (e.g. BetterSnapTool) to snap it to one side of the screen. #1276 The command line can now be pinned to the bottom of the window with a setting (under Appearance preference pane). This makes it look better aligned when using smooth resizing, or in other situations where the window size is not a direct multiples of Vim's text size (e.g. full screen or guioption+=k). #1280 New supported text styles -------------------- Vim highlight groups `strikethrough`, `underdouble`, `underdotted`, `underdashed` are now supported. #1287 New Vim features -------------------- Virtual text allows you to place custom texts to be displayed inline for diagnostic information and more (e.g. build errors, CSS color preview). See `:help virtual-text` for more information. The default color schemes (e.g. desert) are now fixed to look correct again. Misc options and commands: - `set nosplitscroll` lets you preserve the windows' scroll positions when splitting. (v9.0.0445) - `:defer` allows you to clean up in a function. (v9.0.0370) - `:echowindow` allows you to echo a message to a floating popup message window instead of to the command line. (v9.0.0321) Fixes ==================== - Fixed non-native full screen not working well with the notch on newer MacBook's when set to not show menu bar. You can also use `MMNonNativeFullScreenSafeAreaBehavior` to force MacVim to use the notch area as well if you don't mind some content being obscured. #1261 - Fixed bad interaction when two settings ("Open untitled window: never" and "After last window closes: Quit MacVim") are set together. #1257 - Fixed the bundled Vim tutor not working when launching from the Help menu #1265. - Fix crashing on launch under macOS 10.9. #1212 - Fixed potential crash when switching appearance mode in MacVim preferences. #1270 - Korean localized menus no longer throw a syntax error on launch. #1278 - `did_install_default_menus` should work in MacVim now. #1267 General ==================== Sparkle (updater for MacVim) is now updated to 1.27.1 (#1284), and we no longer use DSA keys for signing updates (#1285) as we are using EdDSA already. Scripting ==================== - Scripting languages versions: - Python is now built against 3.10, up from 3.9. Compatibility ==================== Requires macOS 10.9 or above. Script interfaces have compatibility with these versions: - Lua 5.4 - Perl 5.18 - Python2 2.7 - Python3 3.10 - Ruby 3.1
ychin added a commit to ychin/macvim that referenced this pull request
Feb 7, 2025In macvim-dev#1547, flicker during font size change and showing tab/scrollbar were reduced. Here, we do something similar for the flicker that happens when entering non-native full screen, where the temporarily moved text view shows a brief temporary draw before the updated Vim redraws over it, leading to a flicker. Use the same mechanism here to block rendering and offset the text view draw while we wait for Vim to preserve visual stability as much as possible. No need to do this for native full screen as the smooth but slow transition means there isn't a sharp flicker anyway. Also, reduce the "fill right" behavior of Core Text renderer (macvim-dev#1276). It's designed to make smooth resizing more seamless but it fills all the way to the right which makes situations like this or maximizing the window jarrying as Vim looks stretched horizontally but not vertically. Just put a sane cap of 4 cell sizes. This way if Vim is a little slow smooth resize still looks good, but it won't stretch across the whole screen.
ychin
mentioned this pull request
ychin added a commit to ychin/macvim that referenced this pull request
Feb 7, 2025In macvim-dev#1547, flicker during font size change and showing tab/scrollbar were reduced. Here, we do something similar for the flicker that happens when entering non-native full screen, where the temporarily moved text view shows a brief temporary draw before the updated Vim redraws over it, leading to a flicker. Use the same mechanism here to block rendering and offset the text view draw while we wait for Vim to preserve visual stability as much as possible. No need to do this for native full screen as the smooth but slow transition means there isn't a sharp flicker anyway. Also, reduce the "fill right" behavior of Core Text renderer (macvim-dev#1276). It's designed to make smooth resizing more seamless but it fills all the way to the right which makes situations like this or maximizing the window jarrying as Vim looks stretched horizontally but not vertically during the resize before Vim catches up and resizes/redraws. Just put a sane cap of 4 cell widths. This way even if Vim is a little slow to respond, smooth resize still looks good, but it won't stretch across the whole screen.
ychin added a commit to ychin/macvim that referenced this pull request
Feb 7, 2025In macvim-dev#1547, flicker during font size change and showing tab/scrollbar were reduced. Here, we do something similar for the flicker that happens when entering non-native full screen, where the temporarily moved text view shows a brief temporary draw before the updated Vim redraws over it, leading to a flicker. Use the same mechanism here to block rendering and offset the text view draw while we wait for Vim to preserve visual stability as much as possible. No need to do this for native full screen as the smooth but slow transition means there isn't a sharp flicker anyway. Also, reduce the "fill right" behavior of Core Text renderer (macvim-dev#1276). It's designed to make smooth resizing more seamless but it fills all the way to the right which makes situations like this or maximizing the window jarrying as Vim looks stretched horizontally but not vertically during the resize before Vim catches up and resizes/redraws. Just put a sane cap of 4 cell widths. This way even if Vim is a little slow to respond, smooth resize still looks good, but it won't stretch across the whole screen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters