Fix bugs with selection

This commit is contained in:
Matthias Neeracher 2011-09-13 03:43:38 +02:00
parent 1ef77bfd96
commit 1ae5e20426
2 changed files with 4 additions and 2 deletions

View File

@ -628,7 +628,7 @@ const char * sBreak[3] = {"", "\xE2\xA4\xBE", "\xE2\x8E\x98"};
// on top. // on top.
// //
if (fSelEnd != kNoMeasure && fSelStart <= fSelEnd if (fSelEnd != kNoMeasure && fSelStart <= fSelEnd
&& fLayout->FirstMeasure(system+1) > fSelStart-(fSelStart==fSelEnd) && fLayout->FirstMeasure(system+1)+(fSelStart==fSelEnd) > fSelStart
&& fLayout->FirstMeasure(system) < fSelEnd+(fSelStart==fSelEnd) && fLayout->FirstMeasure(system) < fSelEnd+(fSelStart==fSelEnd)
) )
[self highlightSelectionForSystem:system]; [self highlightSelectionForSystem:system];

View File

@ -41,7 +41,9 @@
{ {
fView = view; fView = view;
fAnchor = anchor; fAnchor = anchor;
[fView selectMeasure:fAnchor to:fAnchor]; dispatch_async(dispatch_get_main_queue(), ^{
[fView selectMeasure:fAnchor to:fAnchor];
});
return self; return self;
} }