fixed scroll when there was too much text
This commit is contained in:
parent
45be91f33f
commit
f57ed62432
1 changed files with 3 additions and 0 deletions
|
@ -143,6 +143,9 @@
|
|||
if (commandSelector == @selector(insertNewline:)) {
|
||||
retval = YES; // causes Apple to NOT fire the default enter action
|
||||
textField.stringValue = [NSString stringWithFormat:@"%@\n", textField.stringValue];
|
||||
|
||||
[[[textField window] fieldEditor:YES forObject:nil] scrollRangeToVisible:NSMakeRange([[textField stringValue] length], 0)];
|
||||
[[[textField window] fieldEditor:YES forObject:nil] setSelectedRange:NSMakeRange([[textField stringValue] length], 0)];
|
||||
}
|
||||
|
||||
if (commandSelector == @selector(noop:)) {
|
||||
|
|
Reference in a new issue