Menu

Bug report uncomment text block

buhhunyx2
2009-02-26
2012-11-13
  • buhhunyx2

    buhhunyx2 - 2009-02-26

    example.
    before uncomment
    //void main() // <- there is no space after "//"
    //{
    // return 0; // <- there is space after "//"
    // }

    after uncomment by Ctrl+Shift+K:
    oid main() // <- there is no space after "//"

    return 0; // <- there is space after "//"
    }

    as a result N++ loses first symbol after comment sequence.

     
    • Bill Wire

      Bill Wire - 2009-03-30

      I can not only confirm this, but see why it happens.  The line in the example above was not commented using N++ Edit->Toggle Block Comment, or Edit->Block Comment.  It was done "by hand."

      When N++ does it for you through the mentioned menu options (or shortcut-keys), it puts a space character after the comment character(s).  When it "uncomments" it ASSUMES that space is there.  This is what's classically known as a "bad idea" 

      N++ needs to do one of two things: 1) NOT put a space after the comment characters, OR 2) inspect that character when uncommenting to ensure that it is a space.  #1 would be preferable since you may have commented a line with spaces on it, and just because it is a space does not mean it is not significant and may be removed.

      IMHO: N++ should ONLY add the block comment character(s) required for the language, not add a space after.