X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=libchimara%2Fstrio.c;h=f01099ae096c8606f43e52ca544c269315062930;hb=e4819b66649d4963a0661cba603c2967b02a6b80;hp=a33f13f7f53413e41037e3d41dcf90e0c1d79a36;hpb=cc5676c7baac6177e27edfa5553770f62bdc5212;p=rodin%2Fchimara.git diff --git a/libchimara/strio.c b/libchimara/strio.c index a33f13f..f01099a 100644 --- a/libchimara/strio.c +++ b/libchimara/strio.c @@ -43,7 +43,7 @@ write_utf8_to_grid(winid_t win, gchar *s) GtkTextIter end = start; gtk_text_iter_forward_to_line_end(&end); gtk_text_buffer_delete(buffer, &start, &end); - gtk_text_buffer_insert(buffer, &start, s + (length - chars_left), available_space); + gtk_text_buffer_insert_with_tags_by_name(buffer, &start, s + (length - chars_left), available_space, win->window_stream->style, NULL); chars_left -= available_space; gtk_text_iter_forward_line(&start); available_space = win->width; @@ -53,7 +53,7 @@ write_utf8_to_grid(winid_t win, gchar *s) GtkTextIter end = start; gtk_text_iter_forward_chars(&end, chars_left); gtk_text_buffer_delete(buffer, &start, &end); - gtk_text_buffer_insert(buffer, &start, s + (length - chars_left), -1); + gtk_text_buffer_insert_with_tags_by_name(buffer, &start, s + (length - chars_left), -1, win->window_stream->style, NULL); } gtk_text_buffer_move_mark(buffer, cursor, &start); @@ -80,6 +80,10 @@ write_utf8_to_window(winid_t win, gchar *s) gtk_text_buffer_insert_with_tags_by_name(buffer, &iter, s, -1, win->window_stream->style, NULL); gdk_threads_leave(); + + ChimaraGlk *glk = CHIMARA_GLK(gtk_widget_get_ancestor(win->widget, CHIMARA_TYPE_GLK)); + g_assert(glk); + g_signal_emit_by_name(glk, "text-buffer-output", win->rock, s); } /* Internal function: write a Latin-1 buffer with length to a stream. */ @@ -1109,7 +1113,7 @@ glk_stream_get_position(strid_t str) * glk_stream_set_position: * @str: A file or memory stream. * @pos: The position to set the mark to, relative to @seekmode. - * @seekmode: One of #seekmode_Start, #seekmode_Current, or #seekmode_End. + * @seekmode: One of %seekmode_Start, %seekmode_Current, or %seekmode_End. * * Sets the position of the read/write mark in @str. The position is controlled * by @pos, and the meaning of @pos is controlled by @seekmode. See the