Fix min-width in mode-line constructs

* src/xdisp.c (handle_display_prop): To handle min-width's end on
the mode line, call display_min_width also when starting a new
string.  This is needed because mode line supports :propertize
application to a list of strings, and we only need to apply the
effect of min-width at the end of the last element.  (Bug#81354)
This commit is contained in:
Eli Zaretskii 2026-07-04 15:09:36 +03:00
parent 7d01f8f7a4
commit f13e409cf4

View file

@ -5960,7 +5960,11 @@ handle_display_prop (struct it *it)
pos = IT_STRING_CHARPOS (*it);
start = 0;
}
if (pos > start)
if (pos > start
/* If we are iterating over a string and display-stack level
is zero, this is a mode line or similar. The case of
it->sp > 0 is handled in set_iterator_to_next. */
|| (STRINGP (object) && it->sp == 0))
display_min_width (it, pos, objwin, Qnil);
}