Don't recreate the whole log string each time a line is removed.
This commit is contained in:
parent
5afda00ddc
commit
e4480f7a97
|
@ -118,14 +118,13 @@
|
|||
NSString * text = [fTextView string];
|
||||
unsigned int loc = [text rangeOfString: @"\n"].location;
|
||||
if (loc != NSNotFound)
|
||||
[fTextView setString: [[text substringFromIndex: loc + 1] stringByAppendingString: messageString]];
|
||||
[[fTextView textStorage] deleteCharactersInRange: NSMakeRange(0, loc + 1)];
|
||||
}
|
||||
else
|
||||
{
|
||||
fLines++;
|
||||
|
||||
[[fTextView textStorage] appendAttributedString: [[[NSAttributedString alloc] initWithString:
|
||||
messageString attributes: fAttributes] autorelease]];
|
||||
fLines++;
|
||||
}
|
||||
}
|
||||
|
||||
tr_freeMessageList(messages);
|
||||
|
|
Loading…
Reference in New Issue