#574 Keywords at end of file

Bug
closed-fixed
SciTE (626)
2
2013-04-12
2007-06-27
Anonymous
No

SciTE does not recognize keywords that are next to end of file. For example "foreach " would be highlighted, but "foreach<EOF>" would not be. This is a problem in the automatic indentation, since it wont recognize the keywords in thease cases.

Discussion

  • Neil Hodgson

    Neil Hodgson - 2007-06-27

    Logged In: YES
    user_id=12579
    Originator: NO

    Many lexers do not recognize keywords at end of file. I won't be working on this.

     
  • Neil Hodgson

    Neil Hodgson - 2007-06-27
    • priority: 5 --> 2
    • assigned_to: nobody --> nyamatongwe
    • status: open --> open-accepted
     
  • mendynew

    mendynew - 2007-08-17

    Logged In: YES
    user_id=1868763
    Originator: NO

    This is the lexer problem, lexer will colourize the key words when it reads a char after a key word.
    When reaches end of file, it will do nothing.
    Can I give an advice?
    Such as in LexVerilog.cxx,function ColouriseVerilogDoc

    if (sc.state == SCE_V_IDENTIFIER) { // add below when for (; sc.More(); sc.Forward()) is broken.
    if (!IsAWordChar(sc.ch) || (sc.ch == '.')) {
    char s[100];
    sc.GetCurrent(s, sizeof(s));
    if (keywords.InList(s)) {
    sc.ChangeState(SCE_V_WORD);
    } else if (keywords2.InList(s)) {
    sc.ChangeState(SCE_V_WORD2);
    } else if (keywords3.InList(s)) {
    sc.ChangeState(SCE_V_WORD3);
    } else if (keywords4.InList(s)) {
    sc.ChangeState(SCE_V_USER);
    }
    sc.SetState(SCE_V_DEFAULT);
    }
    }
    sc.Complete();

     
  • Neil Hodgson

    Neil Hodgson - 2013-04-09

    A generic fix for lexers that use StyleContext will be included in 3.3.1.

     
  • Neil Hodgson

    Neil Hodgson - 2013-04-09
    • status: open-accepted --> open-fixed
     
  • Neil Hodgson

    Neil Hodgson - 2013-04-12
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks