mirror of
https://github.com/TermiT/Flycut.git
synced 2025-02-23 23:45:35 +08:00
Bezel performance suffers when the copy length gets very large (I frequently copy >1,000,000 characters), so limit the amount given to the Bezel to something closer to the actual Bezel display capacity. Bezel performance is great, the paste still has it all, and the Bezel still has more than it has room to display.
This commit is contained in:
parent
ae0011d388
commit
49e7405fdc
1 changed files with 4 additions and 0 deletions
|
@ -102,6 +102,10 @@ static const float lineHeight = 16;
|
||||||
|
|
||||||
- (void)setText:(NSString *)newText
|
- (void)setText:(NSString *)newText
|
||||||
{
|
{
|
||||||
|
// The Bezel gets slow when newText is huge. Probably the retain.
|
||||||
|
// Since we can't see that much of it anyway, trim to 2000 characters.
|
||||||
|
if ([newText length] > 2000)
|
||||||
|
newText = [newText substringToIndex:2000];
|
||||||
[newText retain];
|
[newText retain];
|
||||||
[bezelText release];
|
[bezelText release];
|
||||||
bezelText = newText;
|
bezelText = newText;
|
||||||
|
|
Loading…
Reference in a new issue