]> git.lyx.org Git - lyx.git/blobdiff - src/Text3.cpp
Simplify the code for "auto" toolbars handling
[lyx.git] / src / Text3.cpp
index 4261ab8201d4fcc32686508f80b5e5886943fd2f..252279a83d2ff14c189820242e617606f8dc0dec 100644 (file)
@@ -1072,12 +1072,13 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                if (!cur.selection()) {
                        if (bv->getIntl().getTransManager().backspace()) {
                                bool par_boundary = cur.pos() == 0;
+                               bool first_par = cur.pit() == 0;
                                // Par boundary, full-screen update
                                if (par_boundary)
                                        singleParUpdate = false;
                                needsUpdate |= backspace(cur);
                                cur.resetAnchor();
-                               if (par_boundary && cur.pos() > 0
+                               if (par_boundary && !first_par && cur.pos() > 0
                                    && cur.paragraph().isEnvSeparator(cur.pos() - 1)) {
                                        needsUpdate |= backspace(cur);
                                        cur.resetAnchor();
@@ -1291,15 +1292,15 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
        }
 
        case LFUN_WORD_UPCASE:
-               changeCase(cur, text_uppercase);
+               changeCase(cur, text_uppercase, cmd.getArg(0) == "partial");
                break;
 
        case LFUN_WORD_LOWCASE:
-               changeCase(cur, text_lowercase);
+               changeCase(cur, text_lowercase, cmd.getArg(0) == "partial");
                break;
 
        case LFUN_WORD_CAPITALIZE:
-               changeCase(cur, text_capitalization);
+               changeCase(cur, text_capitalization, cmd.getArg(0) == "partial");
                break;
 
        case LFUN_CHARS_TRANSPOSE:
@@ -1356,7 +1357,6 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                bv->buffer().errors("Paste");
                cur.clearSelection(); // bug 393
                cur.finishUndo();
-               bv->buffer().updatePreviews();
                break;
        }