From f57ed62432f79a7196bcbbb4eb961f9470df06fb Mon Sep 17 00:00:00 2001 From: Jeena Paradies Date: Fri, 2 Nov 2012 02:30:04 +0100 Subject: [PATCH] fixed scroll when there was too much text --- NewMessageWindow.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NewMessageWindow.m b/NewMessageWindow.m index 0fa4fa8..98d56c1 100644 --- a/NewMessageWindow.m +++ b/NewMessageWindow.m @@ -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:)) {