mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 16:30:53 +00:00
Update text storage directly when undoing text changes in a NSTextView
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35175 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1d0daa994b
commit
d69b1eed65
2 changed files with 14 additions and 2 deletions
|
@ -6388,8 +6388,15 @@ or add guards
|
|||
replacementString: (string ? (NSString*)[string string]
|
||||
: (NSString*)@"")])
|
||||
{
|
||||
[tv replaceCharactersInRange: range
|
||||
withAttributedString: string];
|
||||
if ([string length] > 0)
|
||||
{
|
||||
[aTextStorage replaceCharactersInRange: range
|
||||
withAttributedString: string];
|
||||
}
|
||||
else
|
||||
{
|
||||
[aTextStorage replaceCharactersInRange: range withString: @""];
|
||||
}
|
||||
range.length = [string length];
|
||||
if ([[tv undoManager] isUndoing])
|
||||
[tv setSelectedRange: range];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue