Compose sequences of GTK_MAX_COMPOSE_LEN rejected
With gtk3 3.24.13-1 on Arch Linux, under X11.
To reproduce: Edit ~/.XCompose to add a sequence of seven keys, such as the following:
<Multi_key> <z> <w> <i> <n> <e> <s> : "🥂"
Start a gtk3 program and observe the warning below:
$ gtk3-demo
(gtk3-demo:599786): Gtk-WARNING **: 23:16:10.061: The max number of sequences is 7: <Multi_key> <z> <w> <i> <n> <e> <s> : "🥂"
The warning printed is doubly incorrect: GTK_MAX_COMPOSE_LEN is the max length of a sequence, not the maximum number of sequences (as documented at https://developer.gnome.org/gtk4/stable/GtkIMContextSimple.html#GTK-MAX-COMPOSE-LEN:CAPS), and since it is the maximum, sequences of this length should be permitted rather than rejected.
It looks like the problem is a >=
where there should be a >
in gtkcomposetable.c
's parse_compose_sequence
:
if (0 == n || n >= GTK_MAX_COMPOSE_LEN)
{
g_warning ("The max number of sequences is %d: %s",
GTK_MAX_COMPOSE_LEN, line);
return FALSE;
}