Le 12/04/2024 à 18:16, Scott Kostyshak a écrit :
To reproduce:

1. Open the attached document.
2. Select all.
3. Backspace (to delete everything).

I get the attached screenshot.

Can anyone reproduce?

Yes!

By the way, my secret goal with this batch of bug reports on current
master is to ruin JMarc's Friday evening/weekend :)
However, I think he has healthy work habits so hopefully he doesn't
check his emails.

So instead I spent my evening trying to fix what you just broke (the bug would not have existed if nobody had tried to trigger it).

Does this work?

JMarc


From 05e5be4926ecd79f8263beae895e79b2f57bb61c Mon Sep 17 00:00:00 2001
From: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date: Tue, 16 Apr 2024 23:55:24 +0200
Subject: [PATCH] Always repaint the gray area below main inset

Now that SingleParUpdate does not always lead to a full screen update
when the height of the paragraph changes (see new behavior of
updateMatrics(bool)), it is necessary to make sure that the grey area
below the main page is always repainted.
---
 src/BufferView.cpp | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/BufferView.cpp b/src/BufferView.cpp
index 7abaea0d40..404e38cb5b 100644
--- a/src/BufferView.cpp
+++ b/src/BufferView.cpp
@@ -3711,7 +3711,13 @@ void BufferView::draw(frontend::Painter & pain, bool paint_caret)
 		// Draw everything.
 		tm.draw(pi, 0, y);
 
-		// and possibly grey out below
+		break;
+	}
+	LYXERR(Debug::PAINTING, (pain.isNull() ? "\t\t --- END NODRAW ---"
+	                        : "\t\t *** END DRAWING ***"));
+
+	// Possibly grey out below
+	if (d->update_strategy_ != NoScreenUpdate) {
 		pair<pit_type, ParagraphMetrics const *> lastpm = tm.last();
 		int const y2 = lastpm.second->bottom();
 
@@ -3720,10 +3726,7 @@ void BufferView::draw(frontend::Painter & pain, bool paint_caret)
 				? Color_background : Color_bottomarea;
 			pain.fillRectangle(0, y2, width_, height_ - y2, color);
 		}
-		break;
 	}
-	LYXERR(Debug::PAINTING, (pain.isNull() ? "\t\t --- END NODRAW ---"
-	                        : "\t\t *** END DRAWING ***"));
 
 	// The scrollbar needs an update.
 	// FIXME: does it always? see ticket #11947.
-- 
2.40.1

-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to