X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Foutput_latex.cpp;h=f6c7375c90a7513df16591c209cadad590131d50;hb=cc4ed5e04b41e86e51f44d467680fc597fb94079;hp=ac22116976d7cf8cbb08b0b7ed91802637dc1a78;hpb=59cabde9e3fda6bb6b8b1103f93ba23a3eb7802d;p=features.git diff --git a/src/output_latex.cpp b/src/output_latex.cpp index ac22116976..f6c7375c90 100644 --- a/src/output_latex.cpp +++ b/src/output_latex.cpp @@ -607,6 +607,14 @@ void popLanguageName() } +bool languageStackEmpty() +{ + OutputState * state = getOutputState(); + + return state->lang_switch_depth_.empty(); +} + + string const & openLanguageName() { OutputState * state = getOutputState(); @@ -1768,7 +1776,7 @@ void latexParagraphs(Buffer const & buf, << '\n'; // If we have language_auto_begin, the stack will // already be empty, nothing to pop() - if (using_begin_end && !lyxrc.language_auto_begin) + if (using_begin_end && langOpenedAtThisLevel(state)) popLanguageName(); }