implement insertNewline: instead of intercepting its command. b=420750 r=masayuki sr=roc a=damon

This commit is contained in:
joshmoz@gmail.com 2008-03-04 14:32:55 -08:00
parent afe04b3027
commit 611b54c343

View File

@ -4030,25 +4030,20 @@ static PRBool IsSpecialGeckoKey(UInt32 macKeyCode)
- (void)insertNewline:(id)sender
{
// dummy impl, does nothing other than stop the beeping when hitting return
[self insertText:@"\n"];
}
- (void) doCommandBySelector:(SEL)aSelector
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
#if DEBUG_IME
NSLog(@"**** in doCommandBySelector %s (ignore %d)", aSelector, mIgnoreDoCommand);
#endif
if (mIgnoreDoCommand)
return;
if (aSelector == @selector(insertNewline:)) {
[self insertText:@"\n"];
return;
}
[super doCommandBySelector:aSelector];
if (!mIgnoreDoCommand)
[super doCommandBySelector:aSelector];
NS_OBJC_END_TRY_ABORT_BLOCK;
}