adds TODO for text buffer change warning
authorRobert Timm <mail@rtti.de>
Mon, 17 Apr 2017 21:22:39 +0000 (23:22 +0200)
committerRobert Timm <mail@rtti.de>
Fri, 21 Apr 2017 06:17:08 +0000 (08:17 +0200)
src/ex.c

index 20e0eaa..0949f55 100644 (file)
--- a/src/ex.c
+++ b/src/ex.c
@@ -380,6 +380,16 @@ void ex_input_changed(Client *c, const char *text)
         gtk_text_buffer_get_iter_at_line(buffer, &start, 0);
         if (gtk_text_iter_forward_to_line_end(&start)) {
             gtk_text_buffer_get_end_iter(buffer, &end);
+
+            /* TODO the following line creates a GTK warning.
+             * ex_input_changed() is called from the "changed" event handler of
+             * GtkTextBuffer. Apparently it's not supported to change a text
+             * buffer in the changed handler!?
+             *
+             * Gtk-WARNING **: Invalid text buffer iterator: either the
+             * iterator is uninitialized, or the characters/pixbufs/widgets in
+             * the buffer have been modified since the iterator was created.
+             */
             gtk_text_buffer_delete(buffer, &start, &end);
         }
     }