]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfr1.C
character2.diff.gz
[lyx.git] / src / lyxfr1.C
index 76a99e9cca994d5f5eee732329c6b65c132c7e04..f6d575f7427ea3a3857f5ec10b2c9647a9ea5194 100644 (file)
@@ -82,7 +82,7 @@ void SetSelectionOverLenChars(BufferView * bv, int len)
        bv->text->sel_cursor = bv->text->cursor;
        for (int i = 0; i < len; ++i)
                bv->text->CursorRight(bv);
-       bv->text->SetSelection();
+       bv->text->SetSelection(bv);
 }
 
 
@@ -129,7 +129,7 @@ void LyXFindReplace::SearchReplaceCB()
        string const replacestring = SF.ReplaceString();
 
        bv->hideCursor();
-       bv->update(BufferView::SELECT|BufferView::FITCUR);
+       bv->update(bv->text, BufferView::SELECT|BufferView::FITCUR);
 
        LyXText * ltCur = bv->text;     
        if (ltCur->selection) {
@@ -139,7 +139,7 @@ void LyXFindReplace::SearchReplaceCB()
                        ReplaceSelectionWithString(bv, replacestring);
                bv->text->
                        SetSelectionOverString(bv, replacestring);
-               bv->update(BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
+               bv->update(bv->text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
        }
        
        // jump to next match:
@@ -168,7 +168,7 @@ void LyXFindReplace::SearchReplaceAllCB()
        bv->hideCursor();
 
        // start at top
-       bv->text->ClearSelection();
+       bv->text->ClearSelection(bv);
        bv->text->CursorTop(bv);
 
        int replace_count = 0;
@@ -176,18 +176,17 @@ void LyXFindReplace::SearchReplaceAllCB()
        do {
                ltCur = bv->text;       
                if (ltCur->selection) {
-                       bv->update(BufferView::SELECT|BufferView::FITCUR);
+                       bv->update(bv->text, BufferView::SELECT|BufferView::FITCUR);
                        bv->toggleSelection(false);
                        bv->text->
                                ReplaceSelectionWithString(bv, replacestring);
                        bv->text->
                                SetSelectionOverString(bv, replacestring);
-                       bv->update(BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE); 
+                       bv->update(bv->text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE); 
                        ++replace_count;
                }
        } while (SearchCB(true));
        if (replace_count == 0) {
-               LyXBell();      
                bv->owner()->getMiniBuffer()->Set(
                        _("String not found!"));
        } else {
@@ -212,7 +211,7 @@ bool LyXFindReplace::SearchCB(bool fForward)
                return false;
    
        bv->hideCursor();
-       bv->update(BufferView::SELECT|BufferView::FITCUR);
+       bv->update(bv->text, BufferView::SELECT|BufferView::FITCUR);
        LyXText * ltCur = bv->text;
        if (ltCur->selection) 
                ltCur->cursor = fForward ? ltCur->sel_end_cursor :
@@ -223,11 +222,11 @@ bool LyXFindReplace::SearchCB(bool fForward)
    
        if (!SF.ValidSearchData() ||
            (fForward ? SearchForward(bv):SearchBackward(bv))) {
-               bv->update(BufferView::SELECT|BufferView::FITCUR);
+               bv->update(bv->text, BufferView::SELECT|BufferView::FITCUR);
 
                // clear the selection (if there is any) 
                bv->toggleSelection();
-               bv->text->ClearSelection();
+               bv->text->ClearSelection(bv);
 
                // set the new selection 
                SetSelectionOverLenChars(bv, iLenSelected);
@@ -235,7 +234,6 @@ bool LyXFindReplace::SearchCB(bool fForward)
                bv->owner()->getMiniBuffer()->Set(_("Found."));
                result = true;
        } else {
-               LyXBell();
                bv->owner()->getMiniBuffer()->Set(_("String not found!"));
                result = false;
        }