Changeset 11127


Ignore:
Timestamp:
01/22/07 16:41:59 (15 years ago)
Author:
piso
Message:

formatLine(): comments

File:
1 edited

Legend:

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

    r10683 r11127  
    22 * LispShellFormatter.java
    33 *
    4  * Copyright (C) 2002-2005 Peter Graves
    5  * $Id: LispShellFormatter.java,v 1.15 2005-12-19 16:00:15 piso Exp $
     4 * Copyright (C) 2002-2007 Peter Graves
     5 * $Id: LispShellFormatter.java,v 1.16 2007-01-22 16:41:59 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    8989    else
    9090      {
    91         int format =
    92           (line.flags() == STATE_INPUT) ? FORMAT_INPUT : FORMAT_TEXT;
    93         addSegment(text, format);
     91        int format = (line.flags() == STATE_INPUT) ? FORMAT_INPUT : FORMAT_TEXT;
     92        int index = text.indexOf(" ;");
     93        if (index >= 0)
     94          {
     95            addSegment(text, 0, index + 1, format);
     96            addSegment(text, index + 1, FORMAT_COMMENT);
     97          }
     98        else
     99          addSegment(text, format);
    94100      }
    95101    return segmentList;
Note: See TracChangeset for help on using the changeset viewer.