]> git.lyx.org Git - features.git/commitdiff
Fix bug #11526
authorEnrico Forestieri <forenr@lyx.org>
Sun, 24 Mar 2019 16:28:01 +0000 (17:28 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:19 +0000 (15:48 +0200)
Correctly categorize a textmode symbol in mathed.

src/Encoding.cpp

index 148ce0b195c44c888bbce672229a8c6d15d528a7..750a2ba3cd6431bcf83fcc07f450914548368d01 100644 (file)
@@ -306,10 +306,11 @@ bool Encodings::latexMathChar(char_type c, bool mathmode,
                if (!encoding || command.empty()) {
                        command = it->second.textcommand();
                        needsTermination = !it->second.textnotermination();
-                       addTextCmd(c);
                }
                if (mathmode)
                        addMathSym(c);
+               else
+                       addTextCmd(c);
        }
        return use_math;
 }