On Wed, May 29, 2002 at 09:39:06AM +0200, Lars Gullik Bjønnes wrote: > Yes, we then should use one of the functions Dekel had instead. > Dekel do you still have them?
Attached.
Index: lyxstring.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/lyxstring.C,v retrieving revision 1.53 diff -u -p -r1.53 lyxstring.C --- lyxstring.C 6 Apr 2002 12:42:42 -0000 1.53 +++ lyxstring.C 1 May 2002 15:40:42 -0000 @@ -1746,9 +1746,17 @@ istream & operator>>(istream & is, lyxst int w = is.width(0); s.clear(); char c = 0; + bool skipspace = true; while (is.get(c)) { - if (isspace(c)) { is.putback(c); break; } - s += c; + if (isspace(c)) { + if (!skipspace) { + is.putback(c); + break; + } + } else { + s += c; + skipspace = false; + } if (--w == 1) break; } if (s.empty()) is.setstate(std::ios::failbit);