commit 4ac539891729894b1c8adaab18aea78a922bb6e8
Author: Jean-Marc Lasgouttes <[email protected]>
Date: Tue Sep 22 17:40:10 2026 +0200
Partially Revert "Remove useless variables declarations or affectations"
Some updates of variables have been reintroduced in case the code is
modified later and relies on that.
This reverts commit fe30c9e968a339592d0245d7be1bdf7fc4e8ebbb.
---
src/Buffer.cpp | 1 +
src/Layout.cpp | 1 +
src/lyxfind.cpp | 1 +
src/output_docbook.cpp | 1 +
src/tex2lyx/math.cpp | 4 +++-
src/tex2lyx/text.cpp | 4 +++-
6 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index 08124ceaa3..f727ffdd08 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -5167,6 +5167,7 @@ void
Buffer::Impl::traverseErrors(TeXErrors::Errors::const_iterator err, TeXErro
buf = this->cloned_buffer_
?
child->d->cloned_buffer_->d->owner_
: child->d->owner_;
+ p = child->d;
break;
}
}
diff --git a/src/Layout.cpp b/src/Layout.cpp
index 80556fe641..08230a5280 100644
--- a/src/Layout.cpp
+++ b/src/Layout.cpp
@@ -1718,6 +1718,7 @@ void Layout::write(ostream & os) const
if (!first)
os << ',';
os << " Right";
+ first = false;
}
os << '\n';
}
diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp
index ed9e262f7e..f6b33d3f7f 100644
--- a/src/lyxfind.cpp
+++ b/src/lyxfind.cpp
@@ -3992,6 +3992,7 @@ MatchStringAdv::MatchStringAdv(lyx::Buffer & buf,
FindAndReplaceOptions & opts)
LYXERR(Debug::FINDVERBOSE, "par_as_string after correctRegex is
'" << par_as_string << "'");
if ((lng > 0) && (par_as_string[0] == '^')) {
par_as_string = par_as_string.substr(1);
+ --lng;
opts.matchAtStart = true;
}
// LYXERR(Debug::FINDVERBOSE, "par_as_string now is '" <<
par_as_string << "'");
diff --git a/src/output_docbook.cpp b/src/output_docbook.cpp
index b4bcc6ad20..4b420d43ef 100644
--- a/src/output_docbook.cpp
+++ b/src/output_docbook.cpp
@@ -858,6 +858,7 @@ DocBookInfoTag getParagraphsWithInfo(ParagraphList const
¶graphs,
if (par.getDepth() == abstractDepth) {
// This is not an abstract paragraph and it
should not either be considered as part
// of it. It breaks the rule that abstract
paragraphs must follow each other.
+ abstractDepth = INVALID_DEPTH;
break;
}
}
diff --git a/src/tex2lyx/math.cpp b/src/tex2lyx/math.cpp
index 832529c4ec..adda26dc74 100644
--- a/src/tex2lyx/math.cpp
+++ b/src/tex2lyx/math.cpp
@@ -252,8 +252,10 @@ void parse_math(Parser & p, ostream & os, unsigned flags,
const mode_type mode)
else
os << t.asInput();
- if (flags & FLAG_LEAVE)
+ if (flags & FLAG_LEAVE) {
+ flags &= ~FLAG_LEAVE;
break;
+ }
}
}
diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp
index 04fc0cf3e3..9d767cd683 100644
--- a/src/tex2lyx/text.cpp
+++ b/src/tex2lyx/text.cpp
@@ -3357,8 +3357,10 @@ void parse_text(Parser & p, ostream & os, unsigned
flags, bool outer,
bool have_cycled = false;
while (p.good()) {
// Leave here only after at least one cycle
- if (have_cycled && flags & FLAG_LEAVE)
+ if (have_cycled && flags & FLAG_LEAVE) {
+ flags &= ~FLAG_LEAVE;
break;
+ }
Token const & t = p.get_token();
#ifdef FILEDEBUG
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs