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];
|
NSString * text = [fTextView string];
|
||||||
unsigned int loc = [text rangeOfString: @"\n"].location;
|
unsigned int loc = [text rangeOfString: @"\n"].location;
|
||||||
if (loc != NSNotFound)
|
if (loc != NSNotFound)
|
||||||
[fTextView setString: [[text substringFromIndex: loc + 1] stringByAppendingString: messageString]];
|
[[fTextView textStorage] deleteCharactersInRange: NSMakeRange(0, loc + 1)];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
[[fTextView textStorage] appendAttributedString: [[[NSAttributedString alloc] initWithString:
|
|
||||||
messageString attributes: fAttributes] autorelease]];
|
|
||||||
fLines++;
|
fLines++;
|
||||||
}
|
|
||||||
|
[[fTextView textStorage] appendAttributedString: [[[NSAttributedString alloc] initWithString:
|
||||||
|
messageString attributes: fAttributes] autorelease]];
|
||||||
}
|
}
|
||||||
|
|
||||||
tr_freeMessageList(messages);
|
tr_freeMessageList(messages);
|
||||||
|
|
Loading…
Reference in New Issue