On Tue, Oct 22, 2002 at 06:31:41PM +0100, John Levon wrote:
> new file
> choose Section
> type "A_B" where _ is protected space (control space)
> view->navigate
> observe AB not A B

Fixed by attached patch.

Ok to apply?

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)
Index: MenuBackend.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/MenuBackend.C,v
retrieving revision 1.56
diff -u -p -r1.56 MenuBackend.C
--- MenuBackend.C       8 Oct 2002 09:24:01 -0000       1.56
+++ MenuBackend.C       22 Oct 2002 17:54:58 -0000
@@ -492,7 +492,8 @@ void expandToc(Menu & tomenu, Buffer con
        toc::TocList::const_iterator end = toc_list.end();
        for (; cit != end; ++cit) {
                // Handle this later
-               if (cit->first == "TOC") continue;
+               if (cit->first == "TOC")
+                       continue;
 
                // All the rest is for floats
                Menu * menu = new Menu;
Index: paragraph.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph.C,v
retrieving revision 1.229
diff -u -p -r1.229 paragraph.C
--- paragraph.C 9 Sep 2002 17:32:51 -0000       1.229
+++ paragraph.C 22 Oct 2002 17:54:58 -0000
@@ -1737,16 +1737,16 @@ string const Paragraph::asString(Buffer 
                value_type c = getChar(i);
                if (IsPrintable(c))
                        s += c;
-               else if (c == META_INSET &&
-                        getInset(i)->lyxCode() == Inset::MATH_CODE) {
-                       ostringstream ost;
-                       getInset(i)->ascii(buffer, ost);
-                       s += subst(ost.str().c_str(),'\n',' ');
+               else if (c == META_INSET) {
+                       // e.g. for math and protected blanks
+                       ostringstream os;
+                       getInset(i)->ascii(buffer, os);
+                       s += subst(os.str().c_str(),'\n',' ');
                }
        }
 
        if (isRightToLeftPar(bparams))
-               reverse(s.begin() + len,s.end());
+               reverse(s.begin() + len, s.end());
 
        return s;
 }

Reply via email to