Menu

#1933 Syntax highlighting disappeared after column 1024 in "Properties" Language comment line

Bug
closed-fixed
nobody
5
2019-12-07
2017-04-11
hugonmelo
No

This bug is related with a Notepad++ issue: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/3150

Steps to reproduce:
1- Open Notepad++ or SciTE;
2- Change the language to "Properties";
3- Write a line with more than 1024 characters;
4- Comment the line (I typed # at the beginning);
5- Verify that every character after the 1024th one is not commented.

2 Attachments

Discussion

  • Neil Hodgson

    Neil Hodgson - 2017-04-12
    • labels: --> scintilla, lexer, properties
    • status: open --> open-accepted
    • Priority: 5 --> 3
     
  • Zufu Liu

    Zufu Liu - 2019-10-23

    Two rewritten lexers, fix this bug and improve DBCS safety for looking assignment in line buffer.
    LexProps-foldComment.cxx support folding comment, the fold code may need improved.

     
  • Zufu Liu

    Zufu Liu - 2019-10-23

    Change unsigned char ch = styler[i]; to char ch = styler[i];.

     
  • Zufu Liu

    Zufu Liu - 2019-10-23

    foldCompact is removed, as it not relevant to this lexer: section last to next section or end of document, so already compact.

     
  • Zufu Liu

    Zufu Liu - 2019-10-25

    fold comment can move to a separator feature request if it mater.

     
  • Neil Hodgson

    Neil Hodgson - 2019-10-25

    The changes differ widely from the original in ways that are not addressing the bug.

     
    • Zufu Liu

      Zufu Liu - 2019-10-26

      The bug is at: || (linePos >= sizeof(lineBuffer) - 1).

       

      Last edit: Zufu Liu 2019-10-26
  • Zufu Liu

    Zufu Liu - 2019-11-02

    include headers need reordered as (according to HeaderCheck.py):

    #include <cassert>
    #include <cstring>
    

    Just fix originally 1024 bytes bug is easy, but the lexer has bug for DBCS characters when looking for assignment.

     
    • Neil Hodgson

      Neil Hodgson - 2019-11-03

      but the lexer has bug for DBCS characters when looking for assignment.

      Not relevant to this bug.

       
  • Neil Hodgson

    Neil Hodgson - 2019-11-03
    • status: open-accepted --> open-fixed
    • Priority: 3 --> 5
     
  • Neil Hodgson

    Neil Hodgson - 2019-11-03

    Fix committed as [56b648]. Uses std::string to avoid fixed limit.

    Example text where last 5 characters are not in comment colour:

    #1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef123
    ab
    
     

    Related

    Commit: [56b648]

  • Zufu Liu

    Zufu Liu - 2019-11-21

    I think the same patch (convert to std::string) can be applied to other lexers that uses the same char lineBuffer[1024] loop, like LexYAML [bugs:#2134], LexMake and LexBatch (has many bugs itself).

     

    Related

    Bugs: #2134

    • Neil Hodgson

      Neil Hodgson - 2019-11-23

      I don't think very long lines are common enough in Make or Batch to be worth working on. YAML is more likely but its still low priority.

       
  • Neil Hodgson

    Neil Hodgson - 2019-12-07
    • status: open-fixed --> closed-fixed
     
  • Neil Hodgson

    Neil Hodgson - 2019-12-07

    Fix committed as [56b648]. Uses std::string to avoid fixed limit.

    Example text where last 5 characters are not in comment colour:

    #1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef123
    ab
    
     

    Related

    Commit: [56b648]


Log in to post a comment.

MongoDB Logo MongoDB