mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Merge pull request #857 from ychin/pre-mojave-scrollbar-render-fix
Fix scrollbar rendering artifact in pre-Mojave renderer
This commit is contained in:
+13
-1
@@ -929,7 +929,19 @@ enum {
|
||||
NSRect textViewRect = [self textViewRectForVimViewSize:[self frame].size];
|
||||
[textView setFrame:textViewRect];
|
||||
|
||||
self.pendingPlaceScrollbars = YES;
|
||||
// Immediately place the scrollbars instead of deferring till later here.
|
||||
// Deferral ended up causing some bugs, in particular when in <10.14
|
||||
// CoreText renderer where [NSAnimationContext beginGrouping] is used to
|
||||
// bundle state changes together and the deferred placeScrollbars would get
|
||||
// the wrong data to use. An alternative would be to check for that and only
|
||||
// call finishPlaceScrollbars once we call [NSAnimationContext endGrouping]
|
||||
// but that makes the code mode complicated. Just do it here and the
|
||||
// performance is fine as this gets called occasionally only
|
||||
// (pendingPlaceScrollbars is mostly for the case if we are adding a lot of
|
||||
// scrollbars at once we want to only call placeScrollbars once instead of
|
||||
// doing it N times).
|
||||
self.pendingPlaceScrollbars = NO;
|
||||
[self placeScrollbars];
|
||||
|
||||
// It is possible that the current number of (rows,columns) is too big or
|
||||
// too small to fit the new frame. If so, notify Vim that the text
|
||||
|
||||
Reference in New Issue
Block a user