]> git.lyx.org Git - features.git/commitdiff
fixed two consecutive spaces handling
authorAllan Rae <rae@lyx.org>
Tue, 24 Apr 2001 06:34:13 +0000 (06:34 +0000)
committerAllan Rae <rae@lyx.org>
Tue, 24 Apr 2001 06:34:13 +0000 (06:34 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1948 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/xforms/ChangeLog
src/frontends/xforms/xforms_helpers.C

index a501337736f2440a89681a653cf01e986f5d2dfc..0ff9446a51004cec30b245e7189758cc4861e7ad 100644 (file)
@@ -1,3 +1,7 @@
+2001-04-24  Allan Rae  <rae@lyx.org>
+
+       * xforms_helpers.C (formatted): two consecutive spaces would kill it.
+
 2001-04-20  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
        * xforms_helpers.C (formatted): do not use string::substr(1) on a
index 9f714c78c68374ef0a24fabe5999d19b0f540bb4..b057e644e3aee93a920888a126600d1689f66211 100644 (file)
@@ -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 {