]> git.lyx.org Git - features.git/commitdiff
- Review screen update flags
authorAsger Ottar Alstrup <alstrup@lyx.org>
Sat, 21 Oct 2006 12:01:14 +0000 (12:01 +0000)
committerAsger Ottar Alstrup <alstrup@lyx.org>
Sat, 21 Oct 2006 12:01:14 +0000 (12:01 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15445 a592a061-630c-0410-9148-cb99ea01b6c8

src/LyXAction.C
src/lyxfunc.C
src/text2.C
src/text3.C

index aa07b19e6865814ed8990d0340cf0a51a3080c8d..8b5eca670e193dc190469772098b470912aa8d7e 100644 (file)
@@ -261,11 +261,11 @@ void LyXAction::init()
                { LFUN_REDO, "redo", Noop },
                { LFUN_LABEL_GOTO, "label-goto", ReadOnly },
                { LFUN_REFERENCE_NEXT, "reference-next", ReadOnly },
-               { LFUN_SCREEN_DOWN, "screen-down", ReadOnly | NoUpdate},
+               { LFUN_SCREEN_DOWN, "screen-down", ReadOnly },
                { LFUN_SCREEN_DOWN_SELECT, "screen-down-select", ReadOnly },
                { LFUN_SCREEN_FONT_UPDATE, "screen-font-update", NoBuffer },
                { LFUN_SCREEN_RECENTER, "screen-recenter", ReadOnly },
-               { LFUN_SCREEN_UP, "screen-up", ReadOnly | NoUpdate},
+               { LFUN_SCREEN_UP, "screen-up", ReadOnly },
                { LFUN_SCREEN_UP_SELECT, "screen-up-select", ReadOnly },
                { LFUN_SELF_INSERT, "self-insert", SingleParUpdate },
                { LFUN_SPACE_INSERT, "space-insert", Noop },
index 7fa89e0b6793ef51ea64ac20b05018d47fc38292..ae6109d09402c573dc3bc841e661679fe0bfd23e 100644 (file)
@@ -721,7 +721,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
        string const argument = to_utf8(cmd.argument());
        kb_action const action = cmd.action;
 
-       lyxerr[Debug::ACTION] << "LyXFunc::dispatch: cmd: " << cmd << endl;
+       lyxerr[Debug::ACTION] << endl << "LyXFunc::dispatch: cmd: " << cmd << endl;
        //lyxerr << "LyXFunc::dispatch: cmd: " << cmd << endl;
 
        // we have not done anything wrong yet.
@@ -1590,6 +1590,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
 
                default: {
                        view()->cursor().dispatch(cmd);
+                       update = false;
                        updateforce |= view()->cursor().result().update();
                        if (!view()->cursor().result().dispatched())
                                updateforce |= view()->dispatch(cmd);
index afc507d4707648bf2771123765a6b442a77c8b1f..3ab916a9c193cd0f937c7941d769ef30107363cb 100644 (file)
@@ -959,6 +959,7 @@ Row const & LyXText::getRowNearY(int y, pit_type pit) const
 InsetBase * LyXText::editXY(LCursor & cur, int x, int y)
 {
        if (lyxerr.debugging(Debug::WORKAREA)) {
+               lyxerr << "LyXText::editXY(cur, " << x << ", " << y << ")" << std::endl;
                bv()->coordCache().dump();
        }
        pit_type pit = getPitNearY(y);
index b594faf69b2091a5a4717c944e9cab6f6dbda966..d0e57a3e3873672b37ee1f6771acbb17b5810288 100644 (file)
@@ -406,7 +406,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
        case LFUN_BUFFER_BEGIN_SELECT:
                cur.selHandle(cmd.action == LFUN_BUFFER_BEGIN_SELECT);
                if (cur.depth() == 1) {
-                       needsUpdate = cursorTop(cur);
+                       needsUpdate |= cursorTop(cur);
                } else {
                        cur.undispatched();
                }
@@ -416,7 +416,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
        case LFUN_BUFFER_END_SELECT:
                cur.selHandle(cmd.action == LFUN_BUFFER_END_SELECT);
                if (cur.depth() == 1) {
-                       needsUpdate = cursorBottom(cur);
+                       needsUpdate |= cursorBottom(cur);
                } else {
                        cur.undispatched();
                }
@@ -428,9 +428,9 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
                //       << " LFUN_CHAR_FORWARD[SEL]:\n" << cur << endl;
                cur.selHandle(cmd.action == LFUN_CHAR_FORWARD_SELECT);
                if (isRTL(cur.paragraph()))
-                       needsUpdate = cursorLeft(cur);
+                       needsUpdate |= cursorLeft(cur);
                else
-                       needsUpdate = cursorRight(cur);
+                       needsUpdate |= cursorRight(cur);
 
                if (!needsUpdate && oldTopSlice == cur.top()
                                && cur.boundary() == oldBoundary) {
@@ -444,9 +444,9 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
                //lyxerr << "handle LFUN_CHAR_BACKWARD[_SELECT]:\n" << cur << endl;
                cur.selHandle(cmd.action == LFUN_CHAR_BACKWARD_SELECT);
                if (isRTL(cur.paragraph()))
-                       needsUpdate = cursorRight(cur);
+                       needsUpdate |= cursorRight(cur);
                else
-                       needsUpdate = cursorLeft(cur);
+                       needsUpdate |= cursorLeft(cur);
 
                if (!needsUpdate && oldTopSlice == cur.top()
                        && cur.boundary() == oldBoundary) {
@@ -461,7 +461,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
                //lyxerr << "handle LFUN_UP[SEL]:\n" << cur << endl;
                cur.selHandle(cmd.action == LFUN_UP_SELECT);
 
-               needsUpdate = cursorUp(cur);
+               needsUpdate |= cursorUp(cur);
                if (!needsUpdate && oldTopSlice == cur.top()
                          && cur.boundary() == oldBoundary) {
                        cur.undispatched();
@@ -474,7 +474,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
                update(cur);
                //lyxerr << "handle LFUN_DOWN[SEL]:\n" << cur << endl;
                cur.selHandle(cmd.action == LFUN_DOWN_SELECT);
-               needsUpdate = cursorDown(cur);
+               needsUpdate |= cursorDown(cur);
                if (!needsUpdate && oldTopSlice == cur.top() &&
                    cur.boundary() == oldBoundary)
                {
@@ -486,13 +486,13 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
        case LFUN_PARAGRAPH_UP:
        case LFUN_PARAGRAPH_UP_SELECT:
                cur.selHandle(cmd.action == LFUN_PARAGRAPH_UP_SELECT);
-               needsUpdate = cursorUpParagraph(cur);
+               needsUpdate |= cursorUpParagraph(cur);
                break;
 
        case LFUN_PARAGRAPH_DOWN:
        case LFUN_PARAGRAPH_DOWN_SELECT:
                cur.selHandle(cmd.action == LFUN_PARAGRAPH_DOWN_SELECT);
-               needsUpdate = cursorDownParagraph(cur);
+               needsUpdate |= cursorDownParagraph(cur);
                break;
 
        case LFUN_SCREEN_UP:
@@ -503,7 +503,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
                        cur.undispatched();
                        cmd = FuncRequest(LFUN_FINISHED_UP);
                } else {
-                       needsUpdate = cursorPrevious(cur);
+                       needsUpdate |= cursorPrevious(cur);
                }
                break;
 
@@ -516,7 +516,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
                        cur.undispatched();
                        cmd = FuncRequest(LFUN_FINISHED_DOWN);
                } else {
-                       needsUpdate = cursorNext(cur);
+                       needsUpdate |= cursorNext(cur);
                }
                break;
 
@@ -524,32 +524,32 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
        case LFUN_LINE_BEGIN_SELECT:
                update(cur);
                cur.selHandle(cmd.action == LFUN_LINE_BEGIN_SELECT);
-               needsUpdate = cursorHome(cur);
+               needsUpdate |= cursorHome(cur);
                break;
 
        case LFUN_LINE_END:
        case LFUN_LINE_END_SELECT:
                update(cur);
                cur.selHandle(cmd.action == LFUN_LINE_END_SELECT);
-               needsUpdate = cursorEnd(cur);
+               needsUpdate |= cursorEnd(cur);
                break;
 
        case LFUN_WORD_FORWARD:
        case LFUN_WORD_FORWARD_SELECT:
                cur.selHandle(cmd.action == LFUN_WORD_FORWARD_SELECT);
                if (isRTL(cur.paragraph()))
-                       needsUpdate = cursorLeftOneWord(cur);
+                       needsUpdate |= cursorLeftOneWord(cur);
                else
-                       needsUpdate = cursorRightOneWord(cur);
+                       needsUpdate |= cursorRightOneWord(cur);
                break;
 
        case LFUN_WORD_BACKWARD:
        case LFUN_WORD_BACKWARD_SELECT:
                cur.selHandle(cmd.action == LFUN_WORD_BACKWARD_SELECT);
                if (isRTL(cur.paragraph()))
-                       needsUpdate = cursorRightOneWord(cur);
+                       needsUpdate |= cursorRightOneWord(cur);
                else
-                       needsUpdate = cursorLeftOneWord(cur);
+                       needsUpdate |= cursorLeftOneWord(cur);
                break;
 
        case LFUN_WORD_SELECT: {
@@ -574,7 +574,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
                        if (cur.pos() == cur.paragraph().size())
                                // Par boundary, force full-screen update
                                singleParUpdate = false;
-                       needsUpdate = erase(cur);
+                       needsUpdate |= erase(cur);
                        cur.resetAnchor();
                        // It is possible to make it a lot faster still
                        // just comment out the line below...
@@ -606,7 +606,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
                                // Par boundary, full-screen update
                                if (cur.pos() == 0)
                                        singleParUpdate = false;
-                               needsUpdate = backspace(cur);
+                               needsUpdate |= backspace(cur);
                                cur.resetAnchor();
                                // It is possible to make it a lot faster still
                                // just comment out the line below...
@@ -709,7 +709,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
        }
 
        case LFUN_INSET_DISSOLVE:
-               needsUpdate = dissolveInset(cur);
+               needsUpdate |= dissolveInset(cur);
                break;
 
        case LFUN_INSET_SETTINGS: