]> git.lyx.org Git - lyx.git/blobdiff - src/Cursor.cpp
Refactor InsetQuotes.h enums
[lyx.git] / src / Cursor.cpp
index 97fbeb6a88704bd67a7a500531befdbd11ae25b3..ee54ace608a3c31a0a297af01c2f6fd6150a563a 100644 (file)
@@ -2399,7 +2399,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());
@@ -2457,6 +2459,12 @@ void Cursor::setCurrentFont()
                real_current_font.setLanguage(lang);
                real_current_font.fontInfo().setNumber(FONT_OFF);
        }
+
+       // No language in pass thru situations
+       if (cs.paragraph().isPassThru()) {
+               current_font.setLanguage(latex_language);
+               real_current_font.setLanguage(latex_language);
+       }
 }