On Wed, 2005-12-14 at 17:06 +0100, Jean-Marc Lasgouttes wrote:
> >>>>> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes:
> 
> Andre> Btw, I noticed an unrelated redrawing bug (unchanged by this
> Andre> patch):
> 
> Andre> New doc a<enter> a<enter> a<enter> a<enter> a<enter> a<enter>
> Andre> <left><left> <backspace> <backspace> <backspace> <backspace>
> Andre> <backspace>
> 
> Andre> The lower paragraphs do not get redrawn correctly.
> 
> I cannot reproduce this. Did someone else succeed?

I remember seeing this too. Attached a patch for two places where full
screen updates would be reasonable but are not being done. The text3 one
probably addresses Andre's problem. The insetcollapsable one is about
the "jumping" of the inset label from inlined to above, causing "turds"
lying around.

(And no, a similar patch for Delete is not needed. Don't ask.)

- Martin

Index: text3.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text3.C,v
retrieving revision 1.321
diff -u -p -r1.321 text3.C
--- text3.C	1 Dec 2005 10:28:49 -0000	1.321
+++ text3.C	16 Dec 2005 10:30:38 -0000
@@ -649,6 +649,9 @@ void LyXText::dispatch(LCursor & cur, Fu
 	case LFUN_BACKSPACE:
 		if (!cur.selection()) {
 			if (bv->owner()->getIntl().getTransManager().backspace()) {
+				// Merging paragraphs should force update
+				if (cur.pos() == 0)
+					needsUpdate = true;
 				backspace(cur);
 				cur.resetAnchor();
 				// It is possible to make it a lot faster still
@@ -1051,9 +1054,9 @@ void LyXText::dispatch(LCursor & cur, Fu
 			CursorSlice old = bvcur.top();
 
 			int const wh = bv->workHeight();
-			int const y = std::max(0, std::min(wh - 1, cmd.y));
+			//int const y = std::max(0, std::min(wh - 1, cmd.y));
 
-			setCursorFromCoordinates(cur, cmd.x, y);
+			//setCursorFromCoordinates(cur, cmd.x, y);
 			cur.x_target() = cmd.x;
 			if (cmd.y >= wh)
 				cursorDown(cur);
@@ -1128,7 +1131,6 @@ void LyXText::dispatch(LCursor & cur, Fu
 
 		cur.resetAnchor();
 		moveCursor(cur, false);
-		bv->updateScrollbar();
 		break;
 	}
 
@@ -1537,6 +1539,7 @@ void LyXText::dispatch(LCursor & cur, Fu
 			cur.bv().update(Update::SinglePar | Update::Force);
 		} else
 			needsUpdate = true;
+
 	if (!needsUpdate
 	    && &oldTopSlice.inset() == &cur.inset()
 	    && oldTopSlice.idx() == cur.idx()
Index: insets/insetcollapsable.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetcollapsable.C,v
retrieving revision 1.280
diff -u -p -r1.280 insetcollapsable.C
--- insets/insetcollapsable.C	24 Oct 2005 09:42:20 -0000	1.280
+++ insets/insetcollapsable.C	16 Dec 2005 10:30:38 -0000
@@ -17,6 +17,7 @@
 #include "buffer.h"
 #include "BufferView.h"
 #include "cursor.h"
+#include "coordcache.h"
 #include "debug.h"
 #include "dispatchresult.h"
 #include "FuncStatus.h"
@@ -138,7 +139,10 @@ void InsetCollapsable::metrics(MetricsIn
 		dim = dimensionCollapsed();
 		if (status() == Open) {
 			InsetText::metrics(mi, textdim_);
+			bool oldopeninlined = openinlined_;
 			openinlined_ = (textdim_.wid + dim.wid <= mi.base.textwidth);
+			if (openinlined_ != oldopeninlined)
+				InsetText::metrics(mi, textdim_);
 			if (openinlined_) {
 				dim.wid += textdim_.wid;
 				dim.des = max(dim.des - textdim_.asc + dim.asc, textdim_.des);

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to