]> git.lyx.org Git - lyx.git/blobdiff - src/lyxlayout.C
fix crash when collapsing ert with cursor inside
[lyx.git] / src / lyxlayout.C
index 0dde84747fb5d11744012fcd834d3fe3e610b861..9cf7ffa447c8a84a2056b3ad91aa5e38f4d21fbc 100644 (file)
@@ -207,7 +207,8 @@ bool LyXLayout::Read(LyXLex & lexrc, LyXTextClass const & tclass)
 
                case LT_COPYSTYLE:     // initialize with a known style
                        if (lexrc.next()) {
-                               string const style = lexrc.getString();
+                               string const style = subst(lexrc.getString(),
+                                                               '_', ' ');
 
                                if (tclass.hasLayout(style)) {
                                        string const tmpname = name_;