mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-28 09:22:03 +00:00
smart paste at end fix
This commit is contained in:
1 parent
fa3567cb9f
commit
cca142ce86
1 file changed
+4
-2
@@ -232,7 +232,8 @@ var kDelegateRespondsTo_textShouldBeginEditing
|
||||
|
||||
if (_copySelectionGranularity > 0 && _selectionRange.location > 0)
|
||||
{
|
||||
if (!_isWhitespaceCharacter([[_textStorage string] characterAtIndex:_selectionRange.location - 1]))
|
||||
if (!_isWhitespaceCharacter([[_textStorage string] characterAtIndex:_selectionRange.location - 1]) &&
|
||||
_selectionRange.location != [_layoutManager numberOfCharacters])
|
||||
{
|
||||
[self insertText:" "];
|
||||
}
|
||||
@@ -263,7 +264,8 @@ var kDelegateRespondsTo_textShouldBeginEditing
|
||||
if (_copySelectionGranularity > 0)
|
||||
{
|
||||
if (!_isWhitespaceCharacter([[_textStorage string] characterAtIndex:CPMaxRange(_selectionRange)]) &&
|
||||
!_isNewlineCharacter([[_textStorage string] characterAtIndex:MAX(0, _selectionRange.location - 1)]))
|
||||
!_isNewlineCharacter([[_textStorage string] characterAtIndex:MAX(0, _selectionRange.location - 1)]) &&
|
||||
_selectionRange.location != [_layoutManager numberOfCharacters])
|
||||
{
|
||||
[self insertText:" "];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user