Lars Gullik Bjønnes wrote: > John Levon <[EMAIL PROTECTED]> writes: > > | An ellipsis should be added to each entry that has been curtailed. > > I am not going to do that... I'll leave that for others.
What about this (ellipsis on the middle)? Regards, Alfredo Index: CutAndPaste.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/CutAndPaste.C,v retrieving revision 1.103 diff -u -r1.103 CutAndPaste.C --- CutAndPaste.C 17 Jun 2003 15:33:45 -0000 1.103 +++ CutAndPaste.C 17 Jun 2003 19:53:34 -0000 @@ -31,6 +31,8 @@ #include "support/lstrings.h" #include "support/limited_stack.h" +#include <algorithm> + using std::endl; using std::pair; using std::make_pair; @@ -58,8 +60,18 @@ 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 frontpar = pars.front().asString(&buffer, false); + string shown; + if (pars.size() == 1 && frontpar.size() < 25) + shown = frontpar; + else { + string backpar = pars.back().asString(&buffer, false); + int frontsize = std::min(int(frontpar.size()), 10); + int backstart = std::max(0, int(backpar.size()) - 10); + shown = frontpar.substr(0, frontsize) + "..." + + backpar.substr(backstart); + } + selList.push_back(shown); } return selList;