mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 14:30:15 +00:00
Bug 701332 - Patch for minor glitch in NSTextInput
This commit is contained in:
parent
c064e18894
commit
43ed68aa33
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user