Skip to content

textchildanchor: allow to specify replacement character

Georg Vienna requested to merge geo/gtk:text-anchor-replacement-char into main

Currently text anchors with widgets will be represented as GTK_TEXT_UNKNOWN_CHAR.
For some use cases (e.g. inlay hints in gnome-builder#1317) it would be nice if the replacement character could be specified by the app.

The following MR allows to create new text anchors with a different replacement character then the default GTK_TEXT_UNKNOWN_CHAR by introducing gtk_text_child_anchor_new_with_replacement.

Tests were added for the default and custom replacement character.

(Happy to back port it to gtk 3 if this gets merged)

Merge request reports