Commit d9b69cba authored by Matthias Clasen's avatar Matthias Clasen

Merge branch 'fix-keycap-sequences' into 'master'

Fix handling of keycap sequences

Closes #502

See merge request !241
parents 8095dd32 6253c71b
Pipeline #214869 passed with stages
in 1 minute and 46 seconds
......@@ -1065,6 +1065,9 @@ itemize_state_init (ItemizeState *state,
width_iter_init (&state->width_iter, text + start_index, length);
_pango_emoji_iter_init (&state->emoji_iter, text + start_index, length);
if (state->emoji_iter.is_emoji)
state->width_iter.end = MAX (state->width_iter.end, state->emoji_iter.end);
update_end (state);
if (pango_font_description_get_set_fields (state->font_desc) & PANGO_FONT_MASK_GRAVITY)
......@@ -1111,15 +1114,18 @@ itemize_state_next (ItemizeState *state)
&state->script_end, &state->script);
state->changed |= SCRIPT_CHANGED;
}
if (state->run_end == state->width_iter.end)
{
width_iter_next (&state->width_iter);
state->changed |= WIDTH_CHANGED;
}
if (state->run_end == state->emoji_iter.end)
{
_pango_emoji_iter_next (&state->emoji_iter);
state->changed |= EMOJI_CHANGED;
if (state->emoji_iter.is_emoji)
state->width_iter.end = MAX (state->width_iter.end, state->emoji_iter.end);
}
if (state->run_end == state->width_iter.end)
{
width_iter_next (&state->width_iter);
state->changed |= WIDTH_CHANGED;
}
update_end (state);
......
0️⃣ Keycap Digit Zero
--- parameters
wrapped: 0
ellipsized: 0
lines: 2
--- attributes
range 0 2147483647
--- lines
i=1, index=0, paragraph-start=1, dir=ltr ' 0️⃣ Keycap Digit Zero
'
i=2, index=27, paragraph-start=1, dir=ltr ''
--- runs
i=1, index=0, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, ' '
i=2, index=1, chars=3, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, '0️⃣'
i=3, index=8, chars=18, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, ' Keycap Digit Zero'
i=4, index=26, no run, line end
i=5, index=27, no run, line end
0️⃣ Keycap Digit Zero
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment