Changeset 3094


Ignore:
Timestamp:
07/26/03 17:52:11 (18 years ago)
Author:
piso
Message:

Use Search.find(Mode, Position) instead of Search.find(Buffer, Position).

Location:
trunk/j/src/org/armedbear/j
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/j/ConfirmReplacementDialog.java

    r3054 r3094  
    33 *
    44 * Copyright (C) 1998-2003 Peter Graves
    5  * $Id: ConfirmReplacementDialog.java,v 1.2 2003-07-23 16:16:15 piso Exp $
     5 * $Id: ConfirmReplacementDialog.java,v 1.3 2003-07-26 17:50:52 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    8888        replacement.replaceOccurrence();
    8989        replacement.getEditor().updateDisplay();
    90         Position pos = replacement.find(editor.getBuffer(), editor.getDot());
     90        Position pos = replacement.find(editor.getMode(), editor.getDot());
    9191        if (pos == null) {
    9292            dispose();
     
    116116            return;
    117117        }
    118         Position pos = replacement.find(editor.getBuffer(), start);
     118        Position pos = replacement.find(editor.getMode(), start);
    119119        if (pos == null) {
    120120            dispose();
     
    149149        // Replace all the rest.
    150150        Position pos;
    151         while ((pos = replacement.find(editor.getBuffer(), editor.getDot())) != null) {
     151        while ((pos = replacement.find(editor.getMode(), editor.getDot())) != null) {
    152152            editor.addUndo(SimpleEdit.MOVE);
    153153            editor.getDot().moveTo(pos);
  • trunk/j/src/org/armedbear/j/Editor.java

    r3084 r3094  
    33 *
    44 * Copyright (C) 1998-2003 Peter Graves
    5  * $Id: Editor.java,v 1.102 2003-07-26 00:38:24 piso Exp $
     5 * $Id: Editor.java,v 1.103 2003-07-26 17:49:03 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    46374637                return;
    46384638            setWaitCursor();
    4639             Position pos = lastSearch.find(buffer, start);
     4639            Position pos = lastSearch.find(buffer.getMode(), start);
    46404640            setDefaultCursor();
    46414641            if (pos != null) {
     
    48424842        else
    48434843            start = new Position(dot);
    4844         Position pos = lastSearch.find(buffer, start);
     4844        Position pos = lastSearch.find(buffer.getMode(), start);
    48454845        if (pos != null && pos.equals(start)) {
    48464846            if (pos.next())
    4847                 pos = lastSearch.find(buffer, pos);
     4847                pos = lastSearch.find(buffer.getMode(), pos);
    48484848        }
    48494849        if (pos != null && !pos.equals(start)) {
     
    48984898            return;
    48994899        lastSearch = new Search(pattern, false, true);
    4900         Position pos = lastSearch.find(buffer, new Position(buffer.getFirstLine(), 0));
     4900        Position pos = lastSearch.find(buffer.getMode(),
     4901                                       new Position(buffer.getFirstLine(), 0));
    49014902        if (pos != null) {
    49024903            moveDotTo(pos);
  • trunk/j/src/org/armedbear/j/FindDialog.java

    r3063 r3094  
    33 *
    44 * Copyright (C) 1998-2003 Peter Graves
    5  * $Id: FindDialog.java,v 1.2 2003-07-24 16:48:30 piso Exp $
     5 * $Id: FindDialog.java,v 1.3 2003-07-26 17:51:20 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    220220            else
    221221                start = editor.getDot();
    222             Position pos = search.find(editor.getBuffer(), start);
     222            Position pos = search.find(editor.getMode(), start);
    223223            editor.setDefaultCursor();
    224224            if (pos != null) {
  • trunk/j/src/org/armedbear/j/ListOccurrences.java

    r3086 r3094  
    33 *
    44 * Copyright (C) 2000-2003 Peter Graves
    5  * $Id: ListOccurrences.java,v 1.5 2003-07-26 16:19:14 piso Exp $
     5 * $Id: ListOccurrences.java,v 1.6 2003-07-26 17:52:11 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    112112        ListOccurrences listOccurrences = null;
    113113        Position pos = new Position(sourceBuffer.getFirstLine(), 0);
    114         while ((pos = search.find(sourceBuffer, pos)) != null) {
     114        while ((pos = search.find(sourceBuffer.getMode(), pos)) != null) {
    115115            if (listOccurrences == null)
    116116                listOccurrences = new ListOccurrences(search, sourceBuffer);
     
    207207            ed.update(ed.getDotLine());
    208208            ed.setDot(target, 0);
    209             Position found = search.find(buf, ed.getDot());
     209            Position found = search.find(buf.getMode(), ed.getDot());
    210210            if (found != null) {
    211211                ed.setDot(found);
  • trunk/j/src/org/armedbear/j/ReplaceDialog.java

    r3063 r3094  
    33 *
    44 * Copyright (C) 1998-2003 Peter Graves
    5  * $Id: ReplaceDialog.java,v 1.2 2003-07-24 16:52:14 piso Exp $
     5 * $Id: ReplaceDialog.java,v 1.3 2003-07-26 17:50:03 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    297297        final Buffer buffer = editor.getBuffer();
    298298        if (replacement.confirmChanges()) {
    299             Position pos = replacement.find(buffer, editor.getDot());
     299            Position pos = replacement.find(buffer.getMode(), editor.getDot());
    300300            if (pos == null) {
    301301                editor.endCompoundEdit(compoundEdit);
     
    332332            Position saved = new Position(editor.getDot());
    333333            Position pos;
    334             while ((pos = replacement.find(buffer, editor.getDot())) != null) {
     334            while ((pos = replacement.find(buffer.getMode(), editor.getDot())) != null) {
    335335                editor.addUndo(SimpleEdit.MOVE);
    336336                editor.getDot().moveTo(pos);
Note: See TracChangeset for help on using the changeset viewer.