summaryrefslogtreecommitdiff
path: root/indra/llwindow/llopenglview-objc.mm
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llwindow/llopenglview-objc.mm')
-rw-r--r--indra/llwindow/llopenglview-objc.mm11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm
index a6ef35a8eb..9d55b2c551 100644
--- a/indra/llwindow/llopenglview-objc.mm
+++ b/indra/llwindow/llopenglview-objc.mm
@@ -420,11 +420,20 @@ attributedStringInfo getSegments(NSAttributedString *str)
setMarkedText(text, selected, replacement, [aString length], segments);
mHasMarkedText = TRUE;
mMarkedTextLength = [aString length];
+ mMarkedText = (NSAttributedString*)[aString mutableString];
}
}
+- (void)commitCurrentPreedit
+{
+ [self insertText:mMarkedText replacementRange:NSMakeRange(0, [mMarkedText length])];
+ [[self inputContext] discardMarkedText];
+}
+
- (void)unmarkText
{
+ [[self inputContext] discardMarkedText];
+ [mMarkedText setValue:@""];
resetPreedit();
mHasMarkedText = FALSE;
}
@@ -517,6 +526,8 @@ attributedStringInfo getSegments(NSAttributedString *str)
{
[glview insertText:aString replacementRange:replacementRange];
[_window orderOut:_window];
+ [[self textStorage] setValue:@""];
+ [[self inputContext] discardMarkedText];
}
@end