Space indentation dissappears when saving .vb file on lines following a )



  • When I save a .vb (visual basic) file that has a line that ends with a ) (closing parentheses) notepad++ removes all the spaces to the left.
    for example this…
    ##two) spaces
    ###three spaces)
    ####four spaces
    #####five spaces
    no spaces
    #one space
    ##two spaces)
    ###three spaces
    ####four spaces
    #####five

    becomes this…
    ##two) spaces
    ###three spaces)
    four spaces
    #####five spaces
    no spaces
    #one space
    ##two spaces)
    three spaces
    ####four spaces
    #####five

    I have two computers with notepad++ and one has this behavior while the other does not.



  • @Clayton-Moudy ,

    It’s going to be hard for us to debug, given the few details you’ve given. The more you can tell us, the easier it is for us to help you.

    I’ve had to guess at your input file. (In this forum when you post, you can just prefix four more spaces on the quoted material, and the forum will properly mark it as preformatted code, so it’s easily set apart. I also included a comment-line… and will possibly need a first line that doesn’t indent)

    # comment-line with no extra spaces to align forum formatting
      two) spaces
       three spaces)
        four spaces
         five spaces
    no spaces
     one space
      two spaces)
       three spaces
        four spaces
         five
    # blank line to align forum formatting
    

    Other than the # lines, is that an accurate representation of your file?

    What is the difference between the two computers? Could you grab the ? > Debug Info > copy for each computer’s Notepad++, and paste in a reply – and mark which one does it right, and which does it wrong? What other settings are different between the NPP installations on each?


Log in to reply