X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetCitation.cpp;h=13fddd7802217c2f6015ee5c87bf2625a5bdfeb9;hb=3d7ede605978461a6bd67b250925fcc8bf8404c3;hp=4bf6333f2791bd4dd56d2b7a1d0efd8a9e64440d;hpb=18918f1c1b51b97cce756132a009435b9e2e5847;p=lyx.git diff --git a/src/insets/InsetCitation.cpp b/src/insets/InsetCitation.cpp index 4bf6333f27..13fddd7802 100644 --- a/src/insets/InsetCitation.cpp +++ b/src/insets/InsetCitation.cpp @@ -24,6 +24,7 @@ #include "LaTeXFeatures.h" #include "output_xhtml.h" #include "ParIterator.h" +#include "texstream.h" #include "TocBackend.h" #include "support/debug.h" @@ -165,17 +166,18 @@ docstring InsetCitation::toolTip(BufferView const & bv, int, int) const return _("No citations selected!"); vector keys = getVectorFromString(key); - vector::const_iterator it = keys.begin(); - vector::const_iterator en = keys.end(); + if (keys.size() == 1) + return bi.getInfo(keys[0], buffer(), true); + docstring tip; - for (; it != en; ++it) { - docstring const key_info = bi.getInfo(*it, buffer()); + tip += "
    "; + for (docstring const & key : keys) { + docstring const key_info = bi.getInfo(key, buffer(), true); if (key_info.empty()) continue; - if (!tip.empty()) - tip += "\n"; - tip += wrap(key_info, -4); + tip += "
  1. " + key_info + "
  2. "; } + tip += "
"; return tip; }