Skip to content
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

Fix scrollbar rendering artifact in pre-Mojave renderer #857

Merged
merged 1 commit into from
Feb 18, 2019

Conversation

ychin
Copy link
Member

@ychin ychin commented Feb 18, 2019

Fix scrollbars not rendering properly when using delayed calls to placeScrollBars. That has issues since pre-Mojave renderer blocks the window from changing size by using [NSAnimationContext beginGrouping]. That causes the bug as placeScrollbars would be using state from previous sizes.

We could fix this by waiting for the animation to end before called finishPlaceScrollbars but it's more complicated and leads to more state tracking. Instead, just call placeScrollbars when we resize immediately (just like before) instead of deferring. We still defer placing scrollbars for things like creating/deleting scrollbars as we could be doing that a lot of times per frame (e.g. calling :only with a lot of splits).

This bug was introduced in #827.

Fix #848

Fix scrollbars not rendering properly when using delayed calls to
placeScrollBars. That has issues since pre-Mojave renderer blocks the
window from changing size by using `[NSAnimationContext beginGrouping]`.
That causes the bug as placeScrollbars would be using state from
previous sizes.

We could fix this by waiting for the animation to end before called
finishPlaceScrollbars but it's more complicated and leads to more state
tracking. Instead, just call placeScrollbars when we resize immediately
(just like before) instead of deferring. We still defer placing
scrollbars for things like creating/deleting scrollbars as we could be
doing that a lot of times per frame (e.g. calling `:only` with a lot of
splits).

Fix macvim-dev#848
@ychin ychin merged commit a92bafb into macvim-dev:master Feb 18, 2019
@ychin ychin deleted the pre-mojave-scrollbar-render-fix branch February 18, 2019 11:42
ychin added a commit to ychin/macvim that referenced this pull request Feb 18, 2019
Vim patch 8.1.950

Fixes:

- Fix Ctrl-C not working properly in Command-Line and Normal mode macvim-dev#856
- Fix scrollbar rendering artifact in macOS 10.13 or below macvim-dev#857
- matchit plugin now works again in MacVim (fixed in Vim 8.1.0875)

Targets macOS 10.8+

Script interfaces have compatibility with these versions:

- Lua 5.3
- Perl 5.18
- Python2 2.7
- Python3 3.7
- Ruby 2.6
ychin added a commit that referenced this pull request Feb 18, 2019
Vim patch 8.1.950

Fixes:

- Fix Ctrl-C not working properly in Command-Line and Normal mode #856
- Fix scrollbar rendering artifact in macOS 10.13 or below #857
- matchit plugin now works again in MacVim (fixed in Vim 8.1.0875)

Targets macOS 10.8+

Script interfaces have compatibility with these versions:

- Lua 5.3
- Perl 5.18
- Python2 2.7
- Python3 3.7
- Ruby 2.6
@ychin ychin added the UI Issues related to UI elements, tabs, scrollbars, window resizing, etc. label Dec 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI Issues related to UI elements, tabs, scrollbars, window resizing, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scrollbar redraw issue on resize with snapshot-154
1 participant