Changeset 214


Ignore:
Timestamp:
11/06/02 18:13:40 (20 years ago)
Author:
piso
Message:

wrapCol, prefixRE

File:
1 edited

Legend:

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

    r211 r214  
    33 *
    44 * Copyright (C) 1998-2002 Peter Graves
    5  * $Id: WrapText.java,v 1.4 2002-11-05 19:06:35 piso Exp $
     5 * $Id: WrapText.java,v 1.5 2002-11-06 18:13:40 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4444        dot = editor.getDot();
    4545        mark = editor.getMark();
    46         // The column numbers we use internally are 0-based.
    47         wrapCol = buffer.getIntegerProperty(Property.WRAP_COL) - 1;
     46        wrapCol = buffer.getIntegerProperty(Property.WRAP_COL);
    4847        tabWidth = buffer.getTabWidth();
    4948        isHtml = buffer.getModeId() == HTML_MODE;
     
    9897        }
    9998    }
    100    
     99
    101100    private void wrapCommentInternal()
    102101    {
     
    316315                    ++adjust;
    317316                remaining = remaining.substring(breakOffset);
    318                 if (remaining.startsWith(" ")) {
     317                if (remaining.length() > 0 && remaining.charAt(0) == ' ') {
    319318                    remaining = remaining.substring(1);
    320319                    if (where <= savedOffset)
     
    539538        return new Position(endLine, endLine.length());
    540539    }
    541    
    542     private static final RE prefixRE = new UncheckedRE("^[> ]+");
    543    
     540
     541    private static final RE prefixRE = new UncheckedRE("^>[> ]*");
     542
    544543    private static String getPrefix(Line line)
    545544    {
Note: See TracChangeset for help on using the changeset viewer.