]> git.lyx.org Git - lyx.git/blobdiff - src/Cursor.cpp
Keep dialog connected to cross-ref inset after Apply.
[lyx.git] / src / Cursor.cpp
index 39083e504358b618853a9d22c02284fa7bd5ffcd..074047f4901f634a21ff0ff70d9b25787ac17883 100644 (file)
@@ -38,6 +38,7 @@
 #include "support/gettext.h"
 #include "support/lassert.h"
 
+#include "insets/InsetLayout.h"
 #include "insets/InsetTabular.h"
 
 #include "mathed/InsetMath.h"
@@ -1878,7 +1879,7 @@ void Cursor::normalize()
                       << " in atom: '";
                odocstringstream os;
                otexrowstream ots(os);
-               WriteStream wi(ots, false, true, WriteStream::wsDefault);
+               TeXMathStream wi(ots, false, true, TeXMathStream::wsDefault);
                inset().asInsetMath()->write(wi);
                lyxerr << to_utf8(os.str()) << endl;
                pos() = lastpos();
@@ -2399,7 +2400,9 @@ bool notifyCursorLeavesOrEnters(Cursor const & old, Cursor & cur)
 
 void Cursor::setLanguageFromInput()
 {
-       if (!lyxrc.respect_os_kbd_language)
+       if (!lyxrc.respect_os_kbd_language
+           || !inTexted()
+           || paragraph().isPassThru())
                return;
        string const & code = theApp()->inputLanguageCode();
        Language const * lang = languages.getFromCode(code, buffer()->getLanguages());
@@ -2468,6 +2471,9 @@ void Cursor::setCurrentFont()
 
 void Cursor::checkBufferStructure()
 {
+       if (buffer()->isInternal())
+               return;
+
        Buffer const * master = buffer()->masterBuffer();
        master->tocBackend().updateItem(*this);
        if (master != buffer() && !master->hasGuiDelegate())