Changeset 4352


Ignore:
Timestamp:
10/13/03 23:49:47 (19 years ago)
Author:
piso
Message:

Reverted to 1.2.

File:
1 edited

Legend:

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

    r3099 r4352  
    33 *
    44 * Copyright (C) 1998-2002 Peter Graves
    5  * $Id: Search.java,v 1.4 2003-07-26 18:49:49 piso Exp $
     5 * $Id: Search.java,v 1.5 2003-10-13 23:49:47 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    166166    protected Position findInBuffer(Buffer buffer)
    167167    {
    168         return find(buffer.getMode(), new Position(buffer.getFirstLine(), 0));
     168        return find(buffer, new Position(buffer.getFirstLine(), 0));
     169    }
     170
     171    public final Position find(Buffer buffer, Position start)
     172    {
     173        return regularExpression ? findRegExp(buffer, start) : findString(buffer, start);
    169174    }
    170175
     
    197202    {
    198203        return regularExpression ? findRegExpDelimited(s, mode) : findStringDelimited(s, mode);
     204    }
     205
     206    // Search is restricted to region if restrictToSelection is true and
     207    // region is not null.
     208    private final Position findString(Buffer buffer, Position start)
     209    {
     210        return findString(buffer.getMode(), start);
    199211    }
    200212
Note: See TracChangeset for help on using the changeset viewer.