mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
No right/bot scrollbar -> no resize indicator
The resize indicator covers the text view when there is no right or bottom scrollbar so don't draw it in this situation. Also avoids a display corruption when using Core Text renderer with ":set go-=r".
This commit is contained in:
@@ -663,6 +663,7 @@ enum {
|
||||
{
|
||||
NSRect textViewFrame = [textView frame];
|
||||
BOOL lsbVisible = [self leftScrollbarVisible];
|
||||
BOOL botOrRightSbVisible = NO;
|
||||
|
||||
// HACK! Find the lowest left&right vertical scrollbars, as well as the
|
||||
// rightmost horizontal scrollbar. This hack continues further down.
|
||||
@@ -686,10 +687,12 @@ enum {
|
||||
&& range.location >= rowMaxRight) {
|
||||
rowMaxRight = range.location;
|
||||
lowestRightSbIdx = i;
|
||||
botOrRightSbVisible = YES;
|
||||
} else if ([scroller type] == MMScrollerTypeBottom
|
||||
&& range.location >= colMax) {
|
||||
colMax = range.location;
|
||||
rightmostSbIdx = i;
|
||||
botOrRightSbVisible = YES;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -778,6 +781,11 @@ enum {
|
||||
[scroller setNeedsDisplay:YES];
|
||||
}
|
||||
}
|
||||
|
||||
// HACK: If there is no bottom or right scrollbar the resize indicator will
|
||||
// cover the bottom-right corner of the text view so tell NSWindow not to
|
||||
// draw it in this situation.
|
||||
[[self window] setShowsResizeIndicator:botOrRightSbVisible];
|
||||
}
|
||||
|
||||
- (NSUInteger)representedIndexOfTabViewItem:(NSTabViewItem *)tvi
|
||||
|
||||
Reference in New Issue
Block a user