This replaces

void BufferView::update(LyXText * text, UpdateCodes f)
void BufferView::update(UpdateCodes f)

with

void BufferView::update()

and removes a couple of instances of multiple update() calls within the
same function.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security, will not have,
nor do they deserve, either one.     (T. Jefferson or B. Franklin or both...)
Index: BufferView.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView.C,v
retrieving revision 1.174
diff -u -p -r1.174 BufferView.C
--- BufferView.C        1 Aug 2003 15:27:54 -0000       1.174
+++ BufferView.C        4 Aug 2003 08:48:39 -0000
@@ -196,18 +196,6 @@ bool BufferView::isSavedPosition(unsigne
 }
 
 
-void BufferView::update(LyXText * text, UpdateCodes f)
-{
-       pimpl_->update(text, f);
-}
-
-
-void BufferView::update(UpdateCodes f)
-{
-       pimpl_->update(f);
-}
-
-
 void BufferView::switchKeyMap()
 {
        pimpl_->switchKeyMap();
@@ -379,12 +367,11 @@ void BufferView::gotoLabel(string const 
             it != buffer()->inset_iterator_end(); ++it) {
                vector<string> labels;
                it->getLabelList(labels);
-               if (find(labels.begin(),labels.end(),label)
-                    != labels.end()) {
+               if (find(labels.begin(),labels.end(),label) != labels.end()) {
                        beforeChange(text);
                        text->setCursor(it.getPar(), it.getPos());
                        text->selection.cursor = text->cursor;
-                       update(text, BufferView::SELECT);
+                       update();
                        return;
                }
        }
@@ -398,11 +385,9 @@ void BufferView::undo()
 
        owner()->message(_("Undo"));
        beforeChange(text);
-       update(text, BufferView::SELECT);
        if (!textUndo(this))
                owner()->message(_("No further undo information"));
-       else
-               update(text, BufferView::SELECT);
+       update();
        switchKeyMap();
 }
 
@@ -414,11 +399,9 @@ void BufferView::redo()
 
        owner()->message(_("Redo"));
        beforeChange(text);
-       update(text, BufferView::SELECT);
        if (!textRedo(this))
                owner()->message(_("No further redo information"));
-       else
-               update(text, BufferView::SELECT);
+       update();
        switchKeyMap();
 }
 
@@ -445,7 +428,7 @@ void BufferView::selectLastWord()
        text->selection.cursor = cur;
        text->selectSelectedWord();
        toggleSelection(false);
-       update(text, BufferView::SELECT);
+       update();
 }
 
 
@@ -456,7 +439,7 @@ void BufferView::endOfSpellCheck()
        beforeChange(text);
        text->selectSelectedWord();
        text->clearSelection();
-       update(text, BufferView::SELECT);
+       update();
 }
 
 
@@ -466,11 +449,9 @@ void BufferView::replaceWord(string cons
                return;
 
        LyXText * tt = getLyXText();
-       update(tt, BufferView::SELECT);
 
        // clear the selection (if there is any)
        toggleSelection(false);
-       update(tt, BufferView::SELECT);
 
        // clear the selection (if there is any)
        toggleSelection(false);
@@ -479,16 +460,14 @@ void BufferView::replaceWord(string cons
        tt->setSelectionRange(replacestring.length());
 
        // Go back so that replacement string is also spellchecked
-       for (string::size_type i = 0; i < replacestring.length() + 1; ++i) {
+       for (string::size_type i = 0; i < replacestring.length() + 1; ++i) 
                tt->cursorLeft(this);
-       }
-       update(tt, BufferView::SELECT);
 
        // FIXME: should be done through LFUN
        buffer()->markDirty();
        fitCursor();
+       update();
 }
-// End of spellchecker stuff
 
 
 bool BufferView::lockInset(UpdatableInset * inset)
@@ -620,7 +599,6 @@ bool BufferView::ChangeInsets(InsetOld::
                        if (it.size() == 1) {
                                text->setCursorIntern(it.pit(), 0);
                                text->redoParagraph(text->cursor.par());
-                               text->partialRebreak();
                        }
                }
        }
Index: BufferView.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView.h,v
retrieving revision 1.135
diff -u -p -r1.135 BufferView.h
--- BufferView.h        1 Aug 2003 15:27:54 -0000       1.135
+++ BufferView.h        4 Aug 2003 08:48:39 -0000
@@ -83,10 +83,6 @@ public:
        bool fitCursor();
        /// perform pending painting updates
        void update();
-       // update for a particular lyxtext
-       void update(LyXText *, UpdateCodes uc);
-       /// update for the top-level lyxtext
-       void update(UpdateCodes uc);
        /// update for a particular inset
        void updateInset(InsetOld * inset);
        /// reset the scrollbar to reflect current view position
Index: BufferView_pimpl.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView_pimpl.C,v
retrieving revision 1.407
diff -u -p -r1.407 BufferView_pimpl.C
--- BufferView_pimpl.C  1 Aug 2003 21:18:48 -0000       1.407
+++ BufferView_pimpl.C  4 Aug 2003 08:48:39 -0000
@@ -644,42 +644,6 @@ void BufferView::Pimpl::update()
 }
 
 
-void BufferView::Pimpl::update(LyXText * text, BufferView::UpdateCodes f)
-{
-       if (!text->selection.set() && (f & SELECT)) {
-               text->selection.cursor = text->cursor;
-       }
-
-       text->partialRebreak();
-
-       if (text->inset_owner) {
-               text->inset_owner->setUpdateStatus(InsetText::NONE);
-               updateInset(text->inset_owner);
-       } else {
-               update();
-       }
-}
-
-
-void BufferView::Pimpl::update(BufferView::UpdateCodes f)
-{
-       LyXText * text = bv_->text;
-
-       if (!text->selection.set() && (f & SELECT)) {
-               text->selection.cursor = text->cursor;
-       }
-
-       text->partialRebreak();
-
-       if (text->inset_owner) {
-               text->inset_owner->setUpdateStatus(InsetText::NONE);
-               updateInset(text->inset_owner);
-       } else {
-               update();
-       }
-}
-
-
 // Callback for cursor timer
 void BufferView::Pimpl::cursorToggle()
 {
@@ -764,7 +728,7 @@ void BufferView::Pimpl::restorePosition(
        bv_->text->setCursor(par.pit(),
                             min(par->size(), saved_positions[i].par_pos));
 
-       update(BufferView::SELECT);
+       update();
        if (i > 0)
                owner_->message(bformat(_("Moved to bookmark %1$s"), tostr(i)));
 }
@@ -822,9 +786,8 @@ void BufferView::Pimpl::center()
        int const half_height = workarea().workHeight() / 2;
        int new_y = 0;
 
-       if (t->cursor.y() > half_height) {
+       if (t->cursor.y() > half_height)
                new_y = t->cursor.y() - half_height;
-       }
 
        // FIXME: look at this comment again ...
 
@@ -839,7 +802,7 @@ void BufferView::Pimpl::center()
        // pretty obfuscated way of updating t->top_y()
        screen().draw(t, bv_, new_y);
 
-       update(BufferView::SELECT);
+       update();
 }
 
 
@@ -971,7 +934,7 @@ void BufferView::Pimpl::trackChanges()
                // we cannot allow undos beyond the freeze point
                buf->undostack.clear();
        } else {
-               update(BufferView::SELECT);
+               update();
                bv_->text->setCursor(buf->paragraphs.begin(), 0);
 #warning changes FIXME
                //moveCursorUpdate(false);
@@ -1177,7 +1140,7 @@ bool BufferView::Pimpl::dispatch(FuncReq
                        owner_->getLyXFunc().handleKeyFunc(ev.action);
                        owner_->getIntl().getTransManager()
                                .TranslateAndInsert(ev.argument[0], bv_->getLyXText());
-                       update(bv_->getLyXText(), BufferView::SELECT);
+                       update();
                }
                break;
 
@@ -1217,9 +1180,9 @@ bool BufferView::Pimpl::dispatch(FuncReq
                        if (name == "bibitem") {
                                // We need to do a redraw because the maximum
                                // InsetBibitem width could have changed
+                               bv_->fitCursor();
 #warning check whether the update() is needed at all
                                bv_->update();
-                               bv_->fitCursor();
                        }
                } else {
                        delete inset;
@@ -1305,40 +1268,38 @@ bool BufferView::Pimpl::dispatch(FuncReq
                break;
 
        case LFUN_ACCEPT_ALL_CHANGES: {
-               update(BufferView::SELECT);
                bv_->text->setCursor(bv_->buffer()->paragraphs.begin(), 0);
 #warning FIXME changes
                //moveCursorUpdate(false);
 
-               while (lyx::find::findNextChange(bv_)) {
+               while (lyx::find::findNextChange(bv_))
                        bv_->getLyXText()->acceptChange();
-               }
-               update(BufferView::SELECT);
+
+               update();
                break;
        }
 
        case LFUN_REJECT_ALL_CHANGES: {
-               update(BufferView::SELECT);
                bv_->text->setCursor(bv_->buffer()->paragraphs.begin(), 0);
 #warning FIXME changes
                //moveCursorUpdate(false);
 
-               while (lyx::find::findNextChange(bv_)) {
+               while (lyx::find::findNextChange(bv_))
                        bv_->getLyXText()->rejectChange();
-               }
-               update(BufferView::SELECT);
+
+               update();
                break;
        }
 
        case LFUN_ACCEPT_CHANGE: {
                bv_->getLyXText()->acceptChange();
-               update(BufferView::SELECT);
+               update();
                break;
        }
 
        case LFUN_REJECT_CHANGE: {
                bv_->getLyXText()->rejectChange();
-               update(BufferView::SELECT);
+               update();
                break;
        }
 
@@ -1370,20 +1331,15 @@ bool BufferView::Pimpl::insertInset(Inse
 
        beforeChange(bv_->text);
        if (!lout.empty()) {
-               update(BufferView::SELECT);
                bv_->text->breakParagraph(bv_->buffer()->paragraphs);
-               update(BufferView::SELECT);
 
                if (!bv_->text->cursor.par()->empty()) {
                        bv_->text->cursorLeft(bv_);
-
                        bv_->text->breakParagraph(bv_->buffer()->paragraphs);
-                       update(BufferView::SELECT);
                }
 
                string lres = lout;
-               LyXTextClass const & tclass =
-                       buffer_->params.getLyXTextClass();
+               LyXTextClass const & tclass = buffer_->params.getLyXTextClass();
                bool hasLayout = tclass.hasLayout(lres);
                string lay = tclass.defaultLayoutName();
 
@@ -1404,11 +1360,10 @@ bool BufferView::Pimpl::insertInset(Inse
                                   LYX_ALIGN_LAYOUT,
                                   string(),
                                   0);
-               update(BufferView::SELECT);
        }
 
        bv_->text->insertInset(inset);
-       update(BufferView::SELECT);
+       update();
 
        unFreezeUndo();
        return true;
@@ -1444,9 +1399,9 @@ void BufferView::Pimpl::updateInset(Inse
        while (tl_inset->owner())
                tl_inset = tl_inset->owner();
        if (tl_inset == inset) {
-               update(BufferView::UPDATE);
+               update();
                if (bv_->text->updateInset(inset)) {
-                       update(BufferView::SELECT);
+                       update();
                        return;
                }
        } else if (static_cast<UpdatableInset *>(tl_inset)
Index: BufferView_pimpl.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView_pimpl.h,v
retrieving revision 1.96
diff -u -p -r1.96 BufferView_pimpl.h
--- BufferView_pimpl.h  1 Aug 2003 15:27:55 -0000       1.96
+++ BufferView_pimpl.h  4 Aug 2003 08:48:39 -0000
@@ -46,10 +46,6 @@ struct BufferView::Pimpl : public boost:
        int resizeCurrentBuffer();
        ///
        void update();
-       //
-       void update(LyXText *, BufferView::UpdateCodes);
-       /// update the toplevel lyx text
-       void update(BufferView::UpdateCodes);
        /**
         * Repaint pixmap. Used for when we've made a visible
         * change but don't need the full update() logic
Index: ParagraphParameters.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ParagraphParameters.C,v
retrieving revision 1.21
diff -u -p -r1.21 ParagraphParameters.C
--- ParagraphParameters.C       30 Jun 2003 23:55:49 -0000      1.21
+++ ParagraphParameters.C       4 Aug 2003 08:48:39 -0000
@@ -421,6 +421,7 @@ void ParagraphParameters::write(ostream 
 }
 
 
+
 void setParagraphParams(BufferView & bv, string const & data)
 {
        istringstream is(STRCONV(data));
@@ -442,9 +443,7 @@ void setParagraphParams(BufferView & bv,
                           params.labelWidthString(),
                           params.noindent());
 
-       // Actually apply these settings
-       bv.update(text, BufferView::SELECT);
-
+       bv.update();
        bv.owner()->message(_("Paragraph layout set"));
 }
 
Index: bufferview_funcs.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/bufferview_funcs.C,v
retrieving revision 1.87
diff -u -p -r1.87 bufferview_funcs.C
--- bufferview_funcs.C  25 Jul 2003 21:20:05 -0000      1.87
+++ bufferview_funcs.C  4 Aug 2003 08:48:39 -0000
@@ -239,11 +239,10 @@ bool changeDepth(BufferView * bv, LyXTex
        if (test_only)
                return text->changeDepth(type, true);
 
-       bv->update(BufferView::SELECT);
        bool const changed = text->changeDepth(type, false);
        if (text->inset_owner)
                bv->updateInset((InsetOld *)text->inset_owner);
-       bv->update(BufferView::SELECT);
+       bv->update();
        return changed;
 }
 
@@ -398,9 +397,8 @@ void toggleAndShow(BufferView * bv, LyXF
        if (!text)
                return;
 
-       bv->update(text, BufferView::SELECT);
        text->toggleFree(font, toggleall);
-       bv->update(text, BufferView::SELECT);
+       bv->update();
 
        if (font.language() != ignore_language ||
            font.number() != LyXFont::IGNORE) {
Index: lyx_cb.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyx_cb.C,v
retrieving revision 1.213
diff -u -p -r1.213 lyx_cb.C
--- lyx_cb.C    27 Jul 2003 22:13:27 -0000      1.213
+++ lyx_cb.C    4 Aug 2003 08:48:39 -0000
@@ -337,8 +337,7 @@ void InsertAsciiFile(BufferView * bv, st
                bv->getLyXText()->insertStringAsLines(tmpstr);
        else
                bv->getLyXText()->insertStringAsParagraphs(tmpstr);
-       if (flag)
-               bv->update(BufferView::SELECT);
+       bv->update();
 }
 
 
Index: lyxfind.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxfind.C,v
retrieving revision 1.43
diff -u -p -r1.43 lyxfind.C
--- lyxfind.C   27 Jul 2003 12:02:56 -0000      1.43
+++ lyxfind.C   4 Aug 2003 08:48:39 -0000
@@ -198,11 +198,9 @@ int replace(BufferView * bv,
                if (!bv->theLockingInset() ||
                        ((text != bv->text) &&
                         (text->inset_owner == text->inset_owner->getLockingInset()))) 
{
-                       bv->update(text, BufferView::SELECT);
                        bv->toggleSelection(false);
                        text->replaceSelectionWithString(replacestr);
                        text->setSelectionRange(replacestr.length());
-                       bv->update(text, BufferView::SELECT);
                        ++replace_count;
                }
                if (!once)
@@ -212,6 +210,7 @@ int replace(BufferView * bv,
        // FIXME: should be called via an LFUN
        bv->buffer()->markDirty();
        bv->fitCursor();
+       bv->update();
 
        return replace_count;
 }
@@ -224,8 +223,6 @@ bool find(BufferView * bv,
        if (!bv->available() || searchstr.empty())
                return false;
 
-       bv->update(bv->getLyXText(), BufferView::SELECT);
-
        if (bv->theLockingInset()) {
                bool found = forward ?
                        bv->theLockingInset()->searchForward(bv, searchstr, casesens, 
matchwrd) :
@@ -263,17 +260,14 @@ bool find(BufferView * bv,
        // inset did it already.
        if (result == SR_FOUND) {
                bv->unlockInset(bv->theLockingInset());
-               bv->update(text, BufferView::SELECT);
                text->setSelectionRange(searchstr.length());
                bv->toggleSelection(false);
-               bv->update(text, BufferView::SELECT);
        } else if (result == SR_NOT_FOUND) {
                bv->unlockInset(bv->theLockingInset());
-               bv->update(text, BufferView::SELECT);
                found = false;
        }
-
        bv->fitCursor();
+       bv->update();
 
        return found;
 }
@@ -369,8 +363,6 @@ bool findNextChange(BufferView * bv)
        if (!bv->available())
                return false;
 
-       bv->update(bv->getLyXText(), BufferView::SELECT);
-
        pos_type length;
 
        if (bv->theLockingInset()) {
@@ -405,17 +397,15 @@ bool findNextChange(BufferView * bv)
        // inset did it already.
        if (result == SR_FOUND) {
                bv->unlockInset(bv->theLockingInset());
-               bv->update(text, BufferView::SELECT);
                text->setSelectionRange(length);
                bv->toggleSelection(false);
-               bv->update(text, BufferView::SELECT);
        } else if (result == SR_NOT_FOUND) {
                bv->unlockInset(bv->theLockingInset());
-               bv->update(text, BufferView::SELECT);
                found = false;
        }
 
        bv->fitCursor();
+       bv->update();
 
        return found;
 }
Index: lyxfunc.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxfunc.C,v
retrieving revision 1.474
diff -u -p -r1.474 lyxfunc.C
--- lyxfunc.C   1 Aug 2003 15:27:56 -0000       1.474
+++ lyxfunc.C   4 Aug 2003 08:48:39 -0000
@@ -115,12 +115,9 @@ LyXFunc::LyXFunc(LyXView * o)
 void LyXFunc::moveCursorUpdate()
 {
        LyXText * lt = view()->text;
-       if (lt->selection.mark()) {
+       if (lt->selection.mark())
                lt->setSelection();
-               if (!lt->isInInset())
-                       view()->update();
-       }
-       view()->update(lt, BufferView::SELECT);
+       view()->update();
        view()->switchKeyMap();
 }
 
@@ -139,7 +136,7 @@ void LyXFunc::handleKeyFunc(kb_action ac
        // actions
        keyseq.clear();
        // copied verbatim from do_accent_char
-       view()->update(view()->getLyXText(), BufferView::SELECT);
+       view()->update();
        view()->getLyXText()->selection.cursor = view()->getLyXText()->cursor;
 }
 
@@ -918,7 +915,7 @@ void LyXFunc::dispatch(FuncRequest const
 #endif
                                        moveCursorUpdate();
                                } else {
-                                       view()->update(view()->text, 
BufferView::SELECT);
+                                       view()->update();
                                }
                                owner->clearMessage();
                                goto exit_with_message;
@@ -1026,7 +1023,7 @@ void LyXFunc::dispatch(FuncRequest const
 
        case LFUN_PREFIX:
                if (view()->available() && !view()->theLockingInset())
-                       view()->update(view()->text, BufferView::SELECT);
+                       view()->update();
                owner->message(keyseq.printOptions());
                break;
 
Index: text.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text.C,v
retrieving revision 1.404
diff -u -p -r1.404 text.C
--- text.C      1 Aug 2003 15:17:20 -0000       1.404
+++ text.C      4 Aug 2003 08:48:39 -0000
@@ -1505,7 +1505,6 @@ void LyXText::breakParagraph(ParagraphLi
        if (cursor.pos() < cursor.par()->size()
             && cursor.par()->isLineSeparator(cursor.pos()))
           cursor.par()->erase(cursor.pos());
-       // cursor.pos(cursor.pos() + 1);
 
        // break the paragraph
        if (keep_layout)
Index: text2.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text2.C,v
retrieving revision 1.414
diff -u -p -r1.414 text2.C
--- text2.C     2 Aug 2003 11:30:24 -0000       1.414
+++ text2.C     4 Aug 2003 08:48:39 -0000
@@ -281,8 +281,7 @@ void LyXText::insertParagraph(ParagraphL
                              RowList::iterator rit)
 {
        // insert a new row, starting at position 0
-       Row newrow(pit, 0);
-       rit = rowlist_.insert(rit, newrow);
+       rit = rowlist_.insert(rit, Row(pit, 0));
 
        // and now append the whole paragraph before the new row
        appendParagraph(rit);
@@ -646,8 +645,6 @@ void LyXText::redoParagraph(ParagraphLis
        //newrow.dump("newrow: ");
 
        // and now append the whole paragraph before the new row
-       // was: appendParagraph(rit);
-
        pos_type const last = rit->par()->size();
        bool done = false;
 
@@ -717,12 +714,16 @@ void LyXText::metrics(MetricsInfo & mi, 
                        ii->inset->metrics(m, dim);
                }
 
+#if 1
                // insert a new row, starting at position 0
                Row newrow(pit, 0);
                RowList::iterator rit = rowlist_.insert(rowlist_.end(), newrow);
 
                // and now append the whole paragraph before the new row
                appendParagraph(rit);
+#else
+               redoParagraph(pit);
+#endif
        }
 
        // compute height
Index: text3.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text3.C,v
retrieving revision 1.101
diff -u -p -r1.101 text3.C
--- text3.C     1 Aug 2003 15:27:56 -0000       1.101
+++ text3.C     4 Aug 2003 08:48:39 -0000
@@ -203,7 +203,6 @@ void LyXText::gotoInset(vector<InsetOld:
                        bool same_content)
 {
        bv()->beforeChange(this);
-       update();
 
        string contents;
        if (same_content && cursor.pos() < cursor.par()->size()
@@ -351,7 +350,7 @@ void LyXText::cursorNext()
 
 void LyXText::update()
 {
-       bv()->update(this, BufferView::SELECT);
+       bv()->update();
 }
 
 namespace {
@@ -435,7 +434,6 @@ InsetOld::RESULT LyXText::dispatch(FuncR
 
        case LFUN_DELETE_WORD_FORWARD:
                bv->beforeChange(this);
-               update();
                deleteWordForward();
                update();
                finishChange(bv);
@@ -443,7 +441,6 @@ InsetOld::RESULT LyXText::dispatch(FuncR
 
        case LFUN_DELETE_WORD_BACKWARD:
                bv->beforeChange(this);
-               update();
                deleteWordBackward();
                update();
                finishChange(bv);
@@ -451,7 +448,6 @@ InsetOld::RESULT LyXText::dispatch(FuncR
 
        case LFUN_DELETE_LINE_FORWARD:
                bv->beforeChange(this);
-               update();
                deleteLineForward();
                update();
                finishChange(bv);
@@ -460,22 +456,22 @@ InsetOld::RESULT LyXText::dispatch(FuncR
        case LFUN_WORDRIGHT:
                if (!selection.mark())
                        bv->beforeChange(this);
-               update();
                if (cursor.par()->isRightToLeftPar(bv->buffer()->params))
                        cursorLeftOneWord();
                else
                        cursorRightOneWord();
                finishChange(bv);
+               update();
                break;
 
        case LFUN_WORDLEFT:
                if (!selection.mark())
                        bv->beforeChange(this);
-               update();
                if (cursor.par()->isRightToLeftPar(bv->buffer()->params))
                        cursorRightOneWord();
                else
                        cursorLeftOneWord();
+               update();
                finishChange(bv);
                break;
 
@@ -642,7 +638,7 @@ InsetOld::RESULT LyXText::dispatch(FuncR
        case LFUN_UP:
                if (!selection.mark())
                        bv->beforeChange(this);
-               bv->update(this, BufferView::UPDATE);
+               bv->update();
                cursorUp(false);
                finishChange(bv);
                break;
@@ -650,7 +646,7 @@ InsetOld::RESULT LyXText::dispatch(FuncR
        case LFUN_DOWN:
                if (!selection.mark())
                        bv->beforeChange(this);
-               bv->update(this, BufferView::UPDATE);
+               bv->update();
                cursorDown(false);
                finishChange(bv);
                break;
@@ -658,7 +654,7 @@ InsetOld::RESULT LyXText::dispatch(FuncR
        case LFUN_UP_PARAGRAPH:
                if (!selection.mark())
                        bv->beforeChange(this);
-               bv->update(this, BufferView::UPDATE);
+               bv->update();
                cursorUpParagraph();
                finishChange(bv);
                break;
@@ -666,7 +662,7 @@ InsetOld::RESULT LyXText::dispatch(FuncR
        case LFUN_DOWN_PARAGRAPH:
                if (!selection.mark())
                        bv->beforeChange(this);
-               bv->update(this, BufferView::UPDATE);
+               bv->update();
                cursorDownParagraph();
                finishChange(bv, false);
                break;
@@ -674,7 +670,7 @@ InsetOld::RESULT LyXText::dispatch(FuncR
        case LFUN_PRIOR:
                if (!selection.mark())
                        bv->beforeChange(this);
-               bv->update(this, BufferView::UPDATE);
+               bv->update();
                cursorPrevious();
                finishChange(bv, false);
                break;
@@ -682,7 +678,7 @@ InsetOld::RESULT LyXText::dispatch(FuncR
        case LFUN_NEXT:
                if (!selection.mark())
                        bv->beforeChange(this);
-               bv->update(this, BufferView::UPDATE);
+               bv->update();
                cursorNext();
                finishChange(bv, false);
                break;
@@ -726,7 +722,6 @@ InsetOld::RESULT LyXText::dispatch(FuncR
                        // It is possible to make it a lot faster still
                        // just comment out the line below...
                } else {
-                       update();
                        cutSelection(true, false);
                        update();
                }
@@ -756,7 +751,6 @@ InsetOld::RESULT LyXText::dispatch(FuncR
                                                 cur.par()->params().align(),
                                                 
cur.par()->params().labelWidthString(), 0);
                                        cursorLeft(bv);
-                                       update();
                                } else {
                                        cursorLeft(bv);
                                        Delete();
@@ -767,7 +761,6 @@ InsetOld::RESULT LyXText::dispatch(FuncR
                                selection.cursor = cursor;
                        }
                } else {
-                       update();
                        cutSelection(true, false);
                }
                update();
@@ -784,7 +777,6 @@ InsetOld::RESULT LyXText::dispatch(FuncR
                                // just comment out the line below...
                        }
                } else {
-                       update();
                        cutSelection(true, false);
                        update();
                }
@@ -1318,9 +1310,6 @@ InsetOld::RESULT LyXText::dispatch(FuncR
                                bv->text->cursorUp(false);
                }
 
-               // Maybe an empty line was deleted
-               if (!bv->text->selection.set())
-                       bv->update(BufferView::UPDATE);
                bv->text->setSelection();
                bv->update();
                bv->fitCursor();
@@ -1381,7 +1370,6 @@ InsetOld::RESULT LyXText::dispatch(FuncR
                // Clear the selection
                bv->screen().toggleSelection(bv->text, bv);
                bv->text->clearSelection();
-               bv->text->partialRebreak();
                bv->update();
                bv->updateScrollbar();
 
@@ -1526,10 +1514,8 @@ InsetOld::RESULT LyXText::dispatch(FuncR
                // true (on).
 
                if (lyxrc.auto_region_delete) {
-                       if (selection.set()) {
+                       if (selection.set())
                                cutSelection(false, false);
-                               update();
-                       }
                        bv->haveSelection(false);
                }
 
Index: frontends/controllers/ControlErrorList.C
===================================================================
RCS file: 
/usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ControlErrorList.C,v
retrieving revision 1.6
diff -u -p -r1.6 ControlErrorList.C
--- frontends/controllers/ControlErrorList.C    12 Jun 2003 11:09:55 -0000      1.6
+++ frontends/controllers/ControlErrorList.C    4 Aug 2003 08:48:39 -0000
@@ -81,5 +81,5 @@ void ControlErrorList::goTo(int item)
        bv->text->setSelectionRange(range);
        bv->toggleSelection(false);
        bv->fitCursor();
-       bv->update(bv->text, BufferView::SELECT);
+       bv->update();
 }
Index: frontends/controllers/ControlSpellchecker.C
===================================================================
RCS file: 
/usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ControlSpellchecker.C,v
retrieving revision 1.46
diff -u -p -r1.46 ControlSpellchecker.C
--- frontends/controllers/ControlSpellchecker.C 30 Jun 2003 23:56:10 -0000      1.46
+++ frontends/controllers/ControlSpellchecker.C 4 Aug 2003 08:48:39 -0000
@@ -61,6 +61,7 @@ void ControlSpellchecker::clearParams()
        endSession();
 }
 
+
 namespace {
 
 SpellBase * getSpeller(BufferParams const & bp)
@@ -86,6 +87,7 @@ SpellBase * getSpeller(BufferParams cons
 
 }
 
+
 void ControlSpellchecker::startSession()
 {
        lyxerr[Debug::GUI] << "spell startSession" << endl;
@@ -148,9 +150,9 @@ void ControlSpellchecker::check()
        // clear any old selection
        LyXText * text = bufferview()->getLyXText();
        bufferview()->toggleSelection(true);
-       bufferview()->update(text, BufferView::SELECT);
+       bufferview()->update();
 
-       while ((res == SpellBase::OK || res == SpellBase::IGNORE)) {
+       while (res == SpellBase::OK || res == SpellBase::IGNORE) {
                word_ = bufferview()->nextWord(newval_);
 
                // end of document

Reply via email to