From 9740810c169f1873525bfbbe0f4a0882e5017358 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Wed, 18 Jun 2003 13:53:11 +0000 Subject: [PATCH] shown-2.diff git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7187 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 4 ++++ src/CutAndPaste.C | 14 ++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 7626886c46..7753e75af3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2003-06-18 Lars Gullik Bjønnes + + * CutAndPaste.C (availableSelections): potentially check all + paragraphs in a cut to fill the shown strings. 2003-06-18 André Pönitz diff --git a/src/CutAndPaste.C b/src/CutAndPaste.C index 9eeebfd887..6d5e2e3116 100644 --- a/src/CutAndPaste.C +++ b/src/CutAndPaste.C @@ -58,8 +58,18 @@ CutAndPaste::availableSelections(Buffer const & buffer) CutStack::const_iterator end = cuts.end(); for (; cit != end; ++cit) { ParagraphList const & pars = cit->first; - string asciiPar(pars.front().asString(&buffer, false), 0, 25); - selList.push_back(asciiPar); + string asciiSel; + ParagraphList::const_iterator pit = pars.begin(); + ParagraphList::const_iterator pend = pars.end(); + for (; pit != pend; ++pit) { + asciiSel += pit->asString(&buffer, false); + if (asciiSel.size() > 25) { + asciiSel.replace(22, string::npos, "..."); + break; + } + } + + selList.push_back(asciiSel); } return selList; -- 2.39.2