]> git.lyx.org Git - lyx.git/blobdiff - src/text3.C
do not create invalid .lyx files when importing \i{}, \j{}, \l{} or \L{}.
[lyx.git] / src / text3.C
index 96b6bfbeaf68111364db3f3ad5135dc4c2a85e1c..f7d9a8806df63939c6974acf49b38d85feff05fc 100644 (file)
@@ -991,7 +991,8 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
                        paste_internally = true;
                }
 
-               bv->mouseSetCursor(cur);
+               // we have to update after dePM triggered
+               bool update = bv->mouseSetCursor(cur);
 
                // Insert primary selection with middle mouse
                // if there is a local selection in the current buffer,
@@ -1003,7 +1004,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
                                lyx::dispatch(FuncRequest(LFUN_PRIMARY_SELECTION_PASTE, "paragraph"));
                }
 
-               if (cmd.button() == mouse_button::button1) {
+               if (!update && cmd.button() == mouse_button::button1) {
                        needsUpdate = false;
                        cur.noUpdate();
                }