From b1280b8651fce6be3e020ced53ecb5a17b59a7ab Mon Sep 17 00:00:00 2001 From: Pawel Z Wronek Date: Mon, 25 Nov 2024 08:28:55 +1100 Subject: Bug [#2456]. Fix wrapping removed lines. --- src/Editor.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index d1bcfa02a..1c3437b7e 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2634,6 +2634,12 @@ void Editor::CheckModificationForWrap(DocModification mh) { const Sci::Line lineDoc = pdoc->SciLineFromPosition(mh.position); const Sci::Line lines = std::max(static_cast(0), mh.linesAdded); if (Wrapping()) { + // Check if this modification crosses any of the wrap points + if (wrapPending.NeedsWrap()) { + if (lineDoc < wrapPending.end) { // Inserted/deleted before or inside wrap range + wrapPending.end += mh.linesAdded; + } + } NeedWrapping(lineDoc, lineDoc + lines + 1); } RefreshStyleData(); -- cgit v1.2.3