diff options
Diffstat (limited to 'iup')
-rwxr-xr-x | iup/src/gtk/iupgtk_text.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/iup/src/gtk/iupgtk_text.c b/iup/src/gtk/iupgtk_text.c index 2d17d17..9499c20 100755 --- a/iup/src/gtk/iupgtk_text.c +++ b/iup/src/gtk/iupgtk_text.c @@ -450,7 +450,10 @@ static int gtkTextSetSelectionAttrib(Ihandle* ih, const char* value) { GtkTextIter start_iter, end_iter; if (gtkTextSelectionAttribToIter(ih, value, &start_iter, &end_iter)) + { + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); gtk_text_buffer_select_range(buffer, &start_iter, &start_iter); + } return 0; } @@ -562,7 +565,10 @@ static int gtkTextSetSelectionPosAttrib(Ihandle* ih, const char* value) { GtkTextIter start_iter, end_iter; if (gtkTextSelectionPosAttribToIter(ih, value, &start_iter, &end_iter)) + { + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); gtk_text_buffer_select_range(buffer, &start_iter, &start_iter); + } return 0; } @@ -1159,7 +1165,7 @@ void iupdrvTextAddFormatTag(Ihandle* ih, Ihandle* formattag) char* selectionpos = iupAttribGet(formattag, "SELECTIONPOS"); if (selectionpos) { - if (!gtkTextSelectionPosAttribToIter(ih, selectionposstart_iter, &end_iter)) + if (!gtkTextSelectionPosAttribToIter(ih, selectionpos, &start_iter, &end_iter)) return; } else { GtkTextMark* mark = gtk_text_buffer_get_insert(buffer); |