mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-26 03:31:02 +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
|
@ -1,3 +1,8 @@
|
||||||
|
2012-06-03 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
|
* Source/NSTextView.m (-performUndo): Update text storage directly
|
||||||
|
when undoing text changes.
|
||||||
|
|
||||||
2012-06-03 Wolfgang Lux <wolfgang.lux@gmail.com>
|
2012-06-03 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
* Tools/GSspell.m (-spellerForLanguage:): Force aspell to return
|
* Tools/GSspell.m (-spellerForLanguage:): Force aspell to return
|
||||||
|
|
|
@ -6388,8 +6388,15 @@ or add guards
|
||||||
replacementString: (string ? (NSString*)[string string]
|
replacementString: (string ? (NSString*)[string string]
|
||||||
: (NSString*)@"")])
|
: (NSString*)@"")])
|
||||||
{
|
{
|
||||||
[tv replaceCharactersInRange: range
|
if ([string length] > 0)
|
||||||
|
{
|
||||||
|
[aTextStorage replaceCharactersInRange: range
|
||||||
withAttributedString: string];
|
withAttributedString: string];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[aTextStorage replaceCharactersInRange: range withString: @""];
|
||||||
|
}
|
||||||
range.length = [string length];
|
range.length = [string length];
|
||||||
if ([[tv undoManager] isUndoing])
|
if ([[tv undoManager] isUndoing])
|
||||||
[tv setSelectedRange: range];
|
[tv setSelectedRange: range];
|
||||||
|
|
Loading…
Reference in a new issue