GNOME Bugzilla – Bug 659350
Gtk.TextBuffer.insert(): the TextIter is a ref argument
Last modified: 2011-09-19 19:03:57 UTC
The API for gtk_text_buffer_insert() says: > iter is invalidated when insertion occurs (because the buffer contents change), but the default signal handler revalidates it to point to the end of the inserted text But here is an example of a C code generated with Vala 0.14: _tmp17_ = doc; _tmp18_ = *iter; _tmp19_ = text_to_insert; gtk_text_buffer_insert (_tmp17_, &_tmp18_, _tmp19_, -1); It should be directly "iter" instead of "&_tmp18_" for the second argument, or reassigning iter to tmp18 afterwards. It's maybe a GObject Introspection tag that is missing in GTK+.
commit 86f29dd04c4482889c913ffa9dd4f79515055de9 Author: Luca Bruno <lucabru@src.gnome.org> Date: Mon Sep 19 21:01:17 2011 +0200 gtk+-2.0, gtk+-3.0: Make TextBuffer.insert iter parameter be ref The insert method will update the iter to point to the end of the inserted text. Fixes bug 659350. This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.