From: Allan Rae Date: Tue, 24 Apr 2001 06:34:13 +0000 (+0000) Subject: fixed two consecutive spaces handling X-Git-Tag: 1.6.10~21289 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=2a3b89c6f1ae70924cdd04324793e3031e897ca7;p=features.git fixed two consecutive spaces handling git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1948 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index a501337736..0ff9446a51 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,7 @@ +2001-04-24 Allan Rae + + * xforms_helpers.C (formatted): two consecutive spaces would kill it. + 2001-04-20 Jean-Marc Lasgouttes * xforms_helpers.C (formatted): do not use string::substr(1) on a diff --git a/src/frontends/xforms/xforms_helpers.C b/src/frontends/xforms/xforms_helpers.C index 9f714c78c6..b057e644e3 100644 --- a/src/frontends/xforms/xforms_helpers.C +++ b/src/frontends/xforms/xforms_helpers.C @@ -50,8 +50,10 @@ string formatted(string const & sin, int w, int size, int style) for (string::const_iterator sit = sin.begin(); sit != sin.end(); ++sit) { if ((*sit) == ' ' || (*sit) == '\n') { - sentence.push_back(word); - word.erase(); + if (!word.empty()) { + sentence.push_back(word); + word.erase(); + } if ((*sit) == '\n') word += '\n'; } else {