mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-06 00:52:58 +00:00
fixed: double clicking right to a word selected too much in some cases
This commit is contained in:
1 parent
c628ea34b7
commit
e1cb11da22
1 file changed
+5
-4
@@ -1868,15 +1868,16 @@ var kDelegateRespondsTo_textShouldBeginEditing
|
||||
break;
|
||||
case CPSelectByParagraph:
|
||||
regex = [[self class] _paragraphBoundaryRegex];
|
||||
|
||||
// triple click right in last line of a paragraph-> select this paragraph completely
|
||||
if (loc > 0 && _isNewlineCharacter([string characterAtIndex:loc]))
|
||||
loc--;
|
||||
|
||||
break;
|
||||
default:
|
||||
return proposedRange;
|
||||
}
|
||||
|
||||
// triple click right in last line of a paragraph-> select this paragraph completely
|
||||
if (loc > 0 && _isNewlineCharacter([string characterAtIndex:loc]))
|
||||
loc--;
|
||||
|
||||
var granularRange = [self _characterRangeForIndex:loc inRange:proposedRange asDefinedByRegex:regex skip:YES];
|
||||
|
||||
if (proposedRange.length == 0 && _isNewlineCharacter([string characterAtIndex:proposedRange.location]))
|
||||
|
||||
Reference in new issue
Block a user