]> git.lyx.org Git - lyx.git/commitdiff
Fix the rest of bug #6284.
authorEnrico Forestieri <forenr@lyx.org>
Fri, 23 Oct 2009 15:00:36 +0000 (15:00 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Fri, 23 Oct 2009 15:00:36 +0000 (15:00 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31694 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/MathStream.cpp

index bfba25e463a7eac03ddd1c19c224f409ed67d990..c0325a97a8b639a3365126ab7c275f6bdf7fdb4e 100644 (file)
@@ -93,6 +93,8 @@ WriteStream & operator<<(WriteStream & ws, docstring const & s)
        } else if (ws.pendingSpace() && s.length() > 0) {
                if (isAlphaASCII(s[0]))
                        ws.os() << ' ';
+               else if (s[0] == ' ' && ws.textMode())
+                       ws.os() << '\\';
                ws.pendingSpace(false);
        }
        ws.os() << s;
@@ -185,6 +187,8 @@ WriteStream & operator<<(WriteStream & ws, char const * s)
        } else if (ws.pendingSpace() && strlen(s) > 0) {
                if (isAlphaASCII(s[0]))
                        ws.os() << ' ';
+               else if (s[0] == ' ' && ws.textMode())
+                       ws.os() << '\\';
                ws.pendingSpace(false);
        }
        ws.os() << s;
@@ -203,6 +207,8 @@ WriteStream & operator<<(WriteStream & ws, char c)
        } else if (ws.pendingSpace()) {
                if (isAlphaASCII(c))
                        ws.os() << ' ';
+               else if (c == ' ' && ws.textMode())
+                       ws.os() << '\\';
                ws.pendingSpace(false);
        }
        ws.os() << c;