]> git.lyx.org Git - lyx.git/blobdiff - src/text3.C
Updates from Bennett and myself.
[lyx.git] / src / text3.C
index 5b45e9d4b917d4b94a6260b1a77439cd4dd269a1..96ef5b1ec3d048bf3a19fc1fbe2f9d086bd6cd9d 100644 (file)
@@ -1187,6 +1187,8 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
        case LFUN_HFILL_INSERT:
        case LFUN_LINE_INSERT:
        case LFUN_PAGEBREAK_INSERT:
+       case LFUN_CLEARPAGE_INSERT:
+       case LFUN_CLEARDOUBLEPAGE_INSERT:
                // do nothing fancy
                doInsertInset(cur, this, cmd, false, false);
                cur.posRight();
@@ -1516,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);
 }
@@ -1804,6 +1815,8 @@ bool LyXText::getStatus(LCursor & cur, FuncRequest const & cmd,
        case LFUN_SELF_INSERT:
        case LFUN_LINE_INSERT:
        case LFUN_PAGEBREAK_INSERT:
+       case LFUN_CLEARPAGE_INSERT:
+       case LFUN_CLEARDOUBLEPAGE_INSERT:
        case LFUN_MATH_DISPLAY:
        case LFUN_MATH_IMPORT_SELECTION:
        case LFUN_MATH_MODE: