After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 772896 - Gtk.TextBuffer.insert_with_tags_by_name() fails with no tags
Gtk.TextBuffer.insert_with_tags_by_name() fails with no tags
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
: 772895 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-10-13 21:59 UTC by Garrett Regier
Modified: 2017-03-22 08:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
overrides: Fix Gtk.TextBuffer.insert_with_tags_by_name() with no tags (1.74 KB, patch)
2016-10-13 22:02 UTC, Garrett Regier
none Details | Review
overrides: Fix Gtk.TextBuffer.insert_with_tags_by_name() with no tags (1.83 KB, patch)
2017-03-22 08:43 UTC, Christoph Reiter (lazka)
committed Details | Review

Description Garrett Regier 2016-10-13 21:59:27 UTC
The override for Gtk.TextBuffer.insert_with_tags_by_name() contains a bug. When no tags are provided it does not insert the text.


Source code for gtk_text_buffer_insert_with_tags_by_name:
https://git.gnome.org/browse/gtk+/tree/gtk/gtktextbuffer.c#n1562
Comment 1 Garrett Regier 2016-10-13 22:02:01 UTC
Created attachment 337671 [details] [review]
overrides: Fix Gtk.TextBuffer.insert_with_tags_by_name() with no tags

The text was not inserted when no tags were provided.


Can someone run the tests? I can't install dbus-run-session which is required now...
Comment 2 Garrett Regier 2016-10-13 22:15:49 UTC
*** Bug 772895 has been marked as a duplicate of this bug. ***
Comment 3 Christoph Reiter (lazka) 2016-10-20 13:10:40 UTC
Review of attachment 337671 [details] [review]:

lgtm
Comment 4 Christoph Reiter (lazka) 2017-03-22 08:43:45 UTC
Created attachment 348462 [details] [review]
overrides: Fix Gtk.TextBuffer.insert_with_tags_by_name() with no tags

Running the tests now give the following error: "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."

I've adjusted the test to use new iterator instances.
Comment 5 Christoph Reiter (lazka) 2017-03-22 08:44:57 UTC
I pushed that one to master