Support menu separator types in tty menus (bug#74740)

* src/xdisp.c (display_tty_menu_item): Display "--" for all menu
separator types.
This commit is contained in:
Gerd Möllmann 2024-12-09 15:08:01 +01:00
parent b8ee67b696
commit d719a81409

View file

@ -27340,6 +27340,17 @@ display_tty_menu_item (const char *item_text, int width, int face_id,
display_string (" >", Qnil, Qnil, 0, 0, &it, width, 0,
FRAME_COLS (f) - 1, -1);
}
else if (menu_separator_name_p (item_text))
{
/* FIXME: This is only a "good enough for now" implementation of
menu separators as described in the Elisp info manual. We
should probably ignore menu separators when computing the width
of a menu. Secondly, we could draw actual horizontal lines of
different styles on ttys, maybe optionally using Unicode
characters via display table entries. Patches very welcome. */
display_string ("--", Qnil, Qnil, 0, 0, &it, width, 0,
FRAME_COLS (f) - 1, -1);
}
else
display_string (item_text, Qnil, Qnil, 0, 0, &it,
width, 0, FRAME_COLS (f) - 1, -1);