Bug 701332 - Patch for minor glitch in NSTextInput

This commit is contained in:
Ek Kato 2013-07-27 13:55:39 -07:00 committed by John Ralls
parent c064e18894
commit 43ed68aa33

View File

@ -125,14 +125,20 @@
-(void)unmarkText
{
GDK_NOTE (EVENTS, g_print ("unmarkText\n"));
gchar *prev_str;
markedRange = selectedRange = NSMakeRange (NSNotFound, 0);
prev_str = g_object_get_data (G_OBJECT (gdk_window), TIC_MARKED_TEXT);
if (prev_str)
g_free (prev_str);
g_object_set_data (G_OBJECT (gdk_window), TIC_MARKED_TEXT, NULL);
}
-(void)setMarkedText: (id)aString selectedRange: (NSRange)newSelection replacementRange: (NSRange)replacementRange
{
GDK_NOTE (EVENTS, g_print ("setMarkedText\n"));
const char *str;
char *prev_str;
gchar *prev_str;
if (replacementRange.location == NSNotFound)
{
@ -176,7 +182,7 @@
{
GDK_NOTE (EVENTS, g_print ("insertText\n"));
const char *str;
char *prev_str;
gchar *prev_str;
if ([self hasMarkedText])
[self unmarkText];