From 86f999097eecbffa8787acb142a425858b5ec671 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sat, 20 Apr 2019 19:42:29 +0200 Subject: [PATCH] reset bibitem counter in the second updateBuffer() routine as well Fixes: #8499 (cherry picked from commit 9370135c3e8d81c7e1ecc8548e8b5492a7f682b6) --- src/Buffer.cpp | 5 +++++ status.23x | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 8819689636..f9caec404b 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -5253,6 +5253,11 @@ void Buffer::updateBuffer(ParIterator & parit, UpdateType utype) const // to resolve macros in it. parit.text()->setMacrocontextPosition(parit); + // Reset bibitem counter in master (#8499) + Buffer const * const master = masterBuffer(); + if (master == this && !d->ignore_parent) + master->params().documentClass().counters().reset(from_ascii("bibitem")); + depth_type maxdepth = 0; pit_type const lastpit = parit.lastpit(); for ( ; parit.pit() <= lastpit ; ++parit.pit()) { diff --git a/status.23x b/status.23x index 17bb4911e8..b28db5cade 100644 --- a/status.23x +++ b/status.23x @@ -50,7 +50,9 @@ What's new * USER INTERFACE +- Fix counter issue with pasted bibitems (bug 8499). +- Deal properly with orphaned bibitems (bug 7160). * INTERNALS -- 2.39.5