From 9b1c5d2233c6736a3167f7971231fcf9416a42d5 Mon Sep 17 00:00:00 2001 From: Pavel Sanda Date: Sat, 13 Sep 2008 22:59:09 +0000 Subject: [PATCH] If we call cur.setSelection() in line Text3.cpp:1256 we should require some sort of repaint, because if the selection is adjusted, we may have to draw the selection again. Patch by Vincent. http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg143572.html git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26392 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Text3.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Text3.cpp b/src/Text3.cpp index 15b68b8dfb..c2ef1d1ad9 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -1254,9 +1254,12 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) // selectWord but bvcur is current // mouse position. cur.bv().cursor().setSelection(); - } + // We might have removed an empty but drawn selection + // (probably a margin) + cur.updateFlags(Update::SinglePar | Update::FitCursor); + } else + cur.noUpdate(); // FIXME: We could try to handle drag and drop of selection here. - cur.noUpdate(); return; case mouse_button::button2: -- 2.39.2