Skip to content
Snippets Groups Projects
Commit 108c54d3 authored by George Nachman's avatar George Nachman
Browse files

Reset user scroll when the buffer is cleared. Change the convenience accessor...

Reset user scroll when the buffer is cleared. Change the convenience accessor for verticalScroller to ptyVerticalScroller since in xcode 9 you can no longer override a superclass method and change the return type to a subclass of the method's original return type. Issue 6174
parent d2786790
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -77,7 +77,7 @@ typedef enum {
stop:(BOOL *)stop {
[aSession.screen terminalSaveScrollPositionWithArgument:@"saveCursorLine"];
if ([self shouldStopScrolling]) {
[[aSession.view.scrollview verticalScroller] setUserScroll:YES];
[[aSession.view.scrollview ptyVerticalScroller] setUserScroll:YES];
}
return YES;
}
Loading
Loading
Loading
Loading
@@ -38,7 +38,7 @@
@interface PTYScrollView : NSScrollView
 
// More specific type for the base class's method.
- (PTYScroller *)verticalScroller;
- (PTYScroller *)ptyVerticalScroller;
 
- (instancetype)initWithFrame:(NSRect)frame hasVerticalScroller:(BOOL)hasVerticalScroller;
- (void)detectUserScroll;
Loading
Loading
Loading
Loading
@@ -135,7 +135,7 @@
[NSValue valueWithRect:[self documentVisibleRect]]];
}
 
- (PTYScroller *)verticalScroller {
- (PTYScroller *)ptyVerticalScroller {
return (PTYScroller *)[super verticalScroller];
}
 
Loading
Loading
Loading
Loading
@@ -1984,7 +1984,7 @@ ITERM_WEAKLY_REFERENCEABLE
// beautiful here, but in that case we want to turn off the bell and scroll to the
// bottom.
[self setBell:NO];
PTYScroller *verticalScroller = [_view.scrollview verticalScroller];
PTYScroller *verticalScroller = [_view.scrollview ptyVerticalScroller];
[verticalScroller setUserScroll:NO];
}
NSData *data = [string dataUsingEncoding:encoding allowLossyConversion:YES];
Loading
Loading
@@ -3912,6 +3912,7 @@ ITERM_WEAKLY_REFERENCEABLE
_shell.size = size;
_shell.size = _screen.size;
}
_view.scrollview.ptyVerticalScroller.userScroll = NO;
}
 
- (void)clearScrollbackBuffer {
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment