mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
Limit InsetCitation tooltip to sensible length
This commit is contained in:
parent
db889bc6a7
commit
fa2cbb730c
@ -241,11 +241,21 @@ docstring InsetCitation::toolTip(BufferView const & bv, int, int) const
|
||||
|
||||
docstring tip;
|
||||
tip += "<ol>";
|
||||
int count = 0;
|
||||
for (docstring const & key : keys) {
|
||||
docstring const key_info = bi.getInfo(key, buffer(), ci);
|
||||
// limit to reasonable size.
|
||||
if (count > 9 && keys.size() > 11) {
|
||||
tip.push_back(0x2026);// HORIZONTAL ELLIPSIS
|
||||
tip += "<p>"
|
||||
+ bformat(_("+ %1$d more entries."), int(keys.size() - count))
|
||||
+ "</p>";
|
||||
break;
|
||||
}
|
||||
if (key_info.empty())
|
||||
continue;
|
||||
tip += "<li>" + key_info + "</li>";
|
||||
++count;
|
||||
}
|
||||
tip += "</ol>";
|
||||
return tip;
|
||||
|
Loading…
Reference in New Issue
Block a user