]> git.lyx.org Git - lyx.git/blobdiff - src/lyxrc.C
fix crash when collapsing ert with cursor inside
[lyx.git] / src / lyxrc.C
index 13497997c439ecbbdbdcc0736503b54dff1faaf4..c6423281daf1d1700af9cadf50e092c17bafdf2c 100644 (file)
@@ -155,6 +155,7 @@ keyword_item lyxrcTags[] = {
        { "\\spell_command", LyXRC::RC_SPELL_COMMAND },
        { "\\tempdir_path", LyXRC::RC_TEMPDIRPATH },
        { "\\template_path", LyXRC::RC_TEMPLATEPATH },
+       { "\\tex_allows_spaces", LyXRC::RC_TEX_ALLOWS_SPACES },
        { "\\ui_file", LyXRC::RC_UIFILE },
        { "\\use_alt_language", LyXRC::RC_USE_ALT_LANG },
        { "\\use_escape_chars", LyXRC::RC_USE_ESC_CHARS },
@@ -268,6 +269,7 @@ void LyXRC::setDefaults() {
        default_language = "english";
        show_banner = true;
        cygwin_path_fix = false;
+       tex_allows_spaces = false;
        date_insert_format = "%A, %e %B %Y";
        cursor_follows_scrollbar = false;
        dialogs_iconify_with_main = false;
@@ -384,18 +386,24 @@ int LyXRC::read(LyXLex & lexrc)
                        }
                        break;
 
-               case RC_KBMAP:
-                       if (lexrc.next()) {
-                               use_kbmap = lexrc.getBool();
-                       }
-                       break;
-
                case RC_CYGWIN_PATH_FIX:
                        if (lexrc.next()) {
                                cygwin_path_fix = lexrc.getBool();
                        }
                        break;
 
+               case RC_TEX_ALLOWS_SPACES:
+                       if (lexrc.next()) {
+                               tex_allows_spaces = lexrc.getBool();
+                       }
+                       break;
+
+               case RC_KBMAP:
+                       if (lexrc.next()) {
+                               use_kbmap = lexrc.getBool();
+                       }
+                       break;
+
                case RC_KBMAP_PRIMARY:
                        if (lexrc.next()) {
                                string const kmap(lexrc.getString());
@@ -1312,18 +1320,22 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc) const
                    index_command != system_lyxrc.index_command) {
                        os << "\\index_command \"" << index_command << "\"\n";
                }
-       case RC_KBMAP:
-               if (ignore_system_lyxrc ||
-                   use_kbmap != system_lyxrc.use_kbmap) {
-                       os << "\\kbmap " << convert<string>(use_kbmap) << '\n';
-               }
-
        case RC_CYGWIN_PATH_FIX:
                if (ignore_system_lyxrc ||
                    cygwin_path_fix != system_lyxrc.cygwin_path_fix) {
                        os << "\\cygwin_path_fix_needed "
                           << convert<string>(cygwin_path_fix) << '\n';
                }
+       case RC_TEX_ALLOWS_SPACES:
+               if (tex_allows_spaces != system_lyxrc.tex_allows_spaces) {
+                       os << "\\tex_allows_spaces "
+                          << convert<string>(tex_allows_spaces) << '\n';
+               }
+       case RC_KBMAP:
+               if (ignore_system_lyxrc ||
+                   use_kbmap != system_lyxrc.use_kbmap) {
+                       os << "\\kbmap " << convert<string>(use_kbmap) << '\n';
+               }
        case RC_KBMAP_PRIMARY:
                if (ignore_system_lyxrc ||
                    primary_kbmap != system_lyxrc.primary_kbmap) {
@@ -2371,6 +2383,9 @@ string const LyXRC::getDescription(LyXRCTags tag)
                str = _("The path that LyX will set when offering to choose a template. An empty value selects the directory LyX was started from.");
                break;
 
+       case RC_TEX_ALLOWS_SPACES:
+               break;
+
        case RC_UIFILE:
                str = _("The UI (user interface) file. Can either specify an absolute path, or LyX will look in its global and local ui/ directories.");
                break;