Menu

Squiggly underlines? A bug?

2008-04-27
2012-11-13
  • Nobody/Anonymous

    For some reason or another, NPP seems to be underlining the scrip after a script tag with a green, squiggly line. This isn't consistent behavior either, since initially it won't be underlined, nor will it be underlined in HTML or XML highlighting, but it will when switching highlighting to Lua or another language. Removing the script tag doesn't stop the underlining until I switch highlight to HTML/XML and then back.

    Help or a bugfix would be greatly appreciated, as most of my work is done precisely on files with this kind of format.

    I'm adding a link to a screenshot, displaying what I have in mind:
    http://hadoryu.zxq.net/npp_underlines.PNG

    Thanks in advance.

     
    • Nobody/Anonymous

      Found and fixed the bug, hopefully the fix will be in the next release:).

      The problem was that HTML was using 7 bits on the byte for styling, everything else was using about 5.
      Those extra bytes werent cleared when switching language, and so if one of those extra bytes was being set (such as in a script tag, which results in the blue HMTL background), switching languages would result in something unexpected, eg the squiggly underlines. (btw I had to set the language to HTML instead of XML

      -Harry

       
      • Nobody/Anonymous

        Thanks a million!

        Going to look forward to the next release!

         
      • Don HO

        Don HO - 2008-04-30

        > Found and fixed the bug, hopefully the fix will be in the next release:).
        > The problem was that HTML was using 7 bits on the byte for styling, everything else was using about 5.

        Wired.
        I do remember that switching among the language (switching lexers in Notepad++ source code) the 5/7 bits are switched correctly.
        Could you mail me the fixed patch, Harry?

        Don

         
    • Nobody/Anonymous

      Looks like a spelling checker is quite active here, to me.

       
    • Nobody/Anonymous

      This is OP.

      The spellchecker isn't even installed. It complained that Aspell wasn't installed when I tried to mess with it initially.

      I then tried an install without plugins, and got exactly the same result. Doesn't seem like it should be the spell-checker.

       
    • Nobody/Anonymous

      This is the OP again.

      Seriously, nobody has any idea? It makes it impossible to use NPP for what I need and there's no discernable reason at all that I can see for this to happen.

       
    • Nobody/Anonymous

      Try a clean install of notepad++ w/o plugins. If the problem persists, could you send an example file or something? The screenshot results in a 403 forbidden :).

       
    • Nobody/Anonymous

      Erk. Sorry.

      http://i7.photobucket.com/albums/y291/hadoryu/npp_underlines.png

      This one should work.

      A XML file (that I've had to rename to .txt so you can look at it) with the typical format I use is available at:
      http://hadoryu.zxq.net/store/Chivalry.txt

      If you want to replicate the error, just download and rename to XML, open in NPP and switch to Python or Lua highlighting.

      And yes, I tried an install without plugins. Deleted the plugins dir and reinstalled. Tried version 4.5 as well - same thing.

      Help would be greatly appreciated.

       
      • Nobody/Anonymous

        If I click on the hyperlink to the .txt file, IE just tries to open it and finds out it is of .xml type, but doesn't match the requirements.

        De XML-pagina kan niet worden weergegeven
        Kan XML-invoer niet lezen met opmaakmodel . Herstel de fout en klik vervolgens op de knop Vernieuwen of probeer het later opnieuw.

        --------------------------------------------------------------------------------

        Meerdere DOCTYPE-declaraties zijn niet toegestaan. Fout bij het verwerken van bron http://hadoryu.zxq.net/store/Chivalry.tx...

        <!DOCTYPE muclient [
        ----------^

         
        • Nobody/Anonymous

          I was able to view the source of the failed .xml page in Notepad++. I saw nothing weird, in either XML, Python or Lua markup. However, it seems the document has been cut inside the (first) large triggers section/listing.

          I opened the document link with FireFox and it just showed me the text as text.
          I saved the doucment as an .xml file and opened it with Notepad++.
          Again, I saw nothing wrong.

          I switched to Lua markup and saw nothing wrong at the top of the document.
          I scroll down quite a bit, but couldn't notice anything unusual.
          Then, to my surprise, suddenly I got the same underlining effect.

          I would have been nice if you had mentioned that this happens from line 767, more than halfway the file.

           
          • Nobody/Anonymous

            Again, sorry for making access to the file difficult. Opera opened it just fine and I never bothered to check with another browser.

            And I did mention I thought the problem started on the <script> tag in the initial post, as well as post a snapshot of the place the underlining starts. I guess I should've made that a bit clearer though, or used a better file as an example.

            Either way, I'm glad you could replicate the problem. Any ideas?

             
            • Nobody/Anonymous

              If the file would have matched the screen print, it would have been a little more clear, I guess.

              No, I have no ideas. This looks to me like a processing error during and/or due to language switching. Perhaps Scintilla loses track of what it is doing or supposed to be doing and says "I don't like this". I think, though, there should be a way to turn these underlines off in some way.

               
              • Nobody/Anonymous

                That's a pain then.. and no, I went through every setting I could find with no success.

                The behavior isn't particularly consistent either, as I explained in the first post. I can just delete the script tag and the underlining won't disappear. :(

                Any way I can.. I dunno, resolve this? Post a bug or something? I really like NPP, but if it keeps doing this, it stops being much of a convenience.