Number Paste Recent menus entries as in toolbar.
Slightly improved patch from Daniel Ramoeller.
This commit is contained in:
Pavel Sanda 2023-06-13 10:07:56 +02:00
parent 22bdd1b619
commit afb918bf78

View File

@ -1420,8 +1420,11 @@ void MenuDefinition::expandPasteRecent(Buffer const * buf)
docstring_list::const_iterator end = sel.end();
for (unsigned int index = 0; cit != end; ++cit, ++index) {
add(MenuItem(MenuItem::Command, toqstr(*cit) + '|',
FuncRequest(LFUN_PASTE, convert<string>(index))));
docstring const i = convert<docstring>(index);
docstring const s = *cit;
docstring const lb = i + from_ascii(". ") + s + "|" + i;
add(MenuItem(MenuItem::Command, toqstr(lb),
FuncRequest(LFUN_PASTE, i)));
}
}