When I add a URL as a hyperlink inset and give it a name, I normally would like to see the full text of the name in the label. This way, it can to a greater extent be part of the surrounding text.
The patch is simple; it only moves the eliding part up where its only the target that is set, not the name: diff --git a/src/insets/InsetHyperlink.cpp b/src/insets/InsetHyperlink.cpp index a500f7bd59..ffa25b9f23 100644 --- a/src/insets/InsetHyperlink.cpp +++ b/src/insets/InsetHyperlink.cpp @@ -65,15 +65,16 @@ docstring InsetHyperlink::screenLabel() const docstring url; url += getParam("name"); - if (url.empty()) + if (url.empty()) { url += getParam("target"); - - // elide if long - if (url.length() > 30) { - docstring end = url.substr(url.length() - 17, url.length()); - support::truncateWithEllipsis(url, 13); - url += end; - } + + // elide if long + if (url.length() > 30) { + docstring end = url.substr(url.length() - 17, url.length()); + support::truncateWithEllipsis(url, 13); + url += end; + } + } return temp + url; } --- Øystein
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel