]> git.lyx.org Git - lyx.git/blobdiff - src/text3.C
Updates from Bennett and myself.
[lyx.git] / src / text3.C
index f74cc67f178bdd295ae4a55ba5a02bab65a7e40e..96ef5b1ec3d048bf3a19fc1fbe2f9d086bd6cd9d 100644 (file)
@@ -1518,7 +1518,16 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
            && oldTopSlice.idx() == cur.idx()
            && !sel // sel is a backup of cur.selection() at the biginning of the function.
            && !cur.selection())
-               cur.noUpdate();
+               // FIXME: it would be better if we could just do this
+               //
+               //if (cur.result().update() != Update::FitCursor)
+               //      cur.noUpdate();
+               // 
+               // But some LFUNs do not set Update::FitCursor when needed, so we
+               // do it for all. This is not very harmfull as FitCursor will provoke
+               // a full redraw only if needed but still, a proper review of all LFUN
+               // should be done and this needsUpdate boolean can then be removed.
+               cur.updateFlags(Update::FitCursor);
        else
                cur.updateFlags(Update::Force | Update::FitCursor);
 }