diff options
author | Geenz <geenz@geenzo.com> | 2013-06-17 08:59:01 -0400 |
---|---|---|
committer | Geenz <geenz@geenzo.com> | 2013-06-17 08:59:01 -0400 |
commit | 93531f3ba85748ba5c9f1d797c4925f55fe8b92c (patch) | |
tree | 7691427ffccb5a711e7c580062976bbeeadbba95 /indra/llwindow/llopenglview-objc.mm | |
parent | f8abfb63c32a0926a393a4359c6f387482d2448e (diff) |
Insert text into the input window when we attempt to insert text without a pre-editor. Also handle backspace as a special case when determining if the input window needs to be displayed.
Diffstat (limited to 'indra/llwindow/llopenglview-objc.mm')
-rw-r--r-- | indra/llwindow/llopenglview-objc.mm | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm index b431321da6..062577baf8 100644 --- a/indra/llwindow/llopenglview-objc.mm +++ b/indra/llwindow/llopenglview-objc.mm @@ -404,10 +404,11 @@ attributedStringInfo getSegments(NSAttributedString *str) - (void)setMarkedText:(id)aString selectedRange:(NSRange)selectedRange replacementRange:(NSRange)replacementRange { - if (mMarkedTextAllowed) + if ([aString class] == NSClassFromString(@"NSConcreteMutableAttributedString")) { - if ([aString class] == NSClassFromString(@"NSConcreteMutableAttributedString")) + if (mMarkedTextAllowed) { + unsigned int selected[2] = { selectedRange.location, selectedRange.length @@ -425,9 +426,13 @@ attributedStringInfo getSegments(NSAttributedString *str) mHasMarkedText = TRUE; mMarkedTextLength = [aString length]; mMarkedText = (NSAttributedString*)[aString mutableString]; + } else if ([[aString mutableString] characterAtIndex:0] != NSBackspaceCharacter) { + showInputWindow(true, aString); + if (mHasMarkedText) + { + [self unmarkText]; + } } - } else { - showInputWindow(true); } } |