Community
    • Login

    Plugins -> NppExport lost color format in version 7.7.7

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    14 Posts 9 Posters 3.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Michael VincentM
      Michael Vincent
      last edited by

      @gerdb42 : I made the one change you recommend:

      diff --git a/src/NppExport.cpp b/src/NppExport.cpp
      index 8dee27b..2ae0ceb 100644
      --- a/src/NppExport.cpp
      +++ b/src/NppExport.cpp
      @@ -369,7 +369,8 @@ void fillScintillaData(CurrentScintillaData * csd, int start, int end) {
              int prevStyle = -1, currentStyle;
      
              //Mask the styles so any indicators get ignored, else overflow possible
      -       int bits = (int)SendMessage(hScintilla, SCI_GETSTYLEBITS, 0, 0);
      +//     int bits = (int)SendMessage(hScintilla, SCI_GETSTYLEBITS, 0, 0);
      +       int bits = 8;
              unsigned char mask = 0xFF >> (8-bits);
              for(int i = 0; i < len; i++) {
                      csd->dataBuffer[i*2+1] &= mask;
      

      on the NppExport source code from GitHub (https://github.com/chcg/NPP_ExportPlugin.git) and recompiled with VS2017 and it works now in both 32-bit and 64-bit N++ 7.7.

      Like you, not sure if this the correct way to go, but for the little I used NppExport, it seems to work fine. Thanks!

      EkopalypseE 1 Reply Last reply Reply Quote 4
      • EkopalypseE
        Ekopalypse @Michael Vincent
        last edited by

        @Michael-Vincent

        for the time being that seems to be ok, maybe you wanna create a PR on @chcg fork so that this plugin gets updated.

        From my limited understanding the whole bits code can be ignored at all as a right shift 0 won’t do anything.

        	int bits = (int)SendMessage(hScintilla, SCI_GETSTYLEBITS, 0, 0);
        	unsigned char mask = 0xFF >> (8-bits);
        

        could become

        	unsigned char mask = 0xFF
        
        1 Reply Last reply Reply Quote 4
        • Michael VincentM
          Michael Vincent
          last edited by

          PR done

          1 Reply Last reply Reply Quote 5
          • guy038G
            guy038
            last edited by

            Hi, @michael-vincent,

            I noticed :

            • your pull request :

            https://github.com/chcg/NPP_ExportPlugin/pull/8

            • your changes, below :

            https://github.com/chcg/NPP_ExportPlugin/pull/8/commits/4ea80cbc315f580fa4159aa05d928cc60de005e1

            So, as I’m not a coder( and wonder if I should one day ! ), could you build / compile and propose a new Nppexport.dll file, directly usable ? Or, may be, there’s a link, that I’ve not noticed yet, on GitHub ?

            Many thanks, by advance for your cooperation !

            Best Regards,

            guy038

            1 Reply Last reply Reply Quote 0
            • Michael VincentM
              Michael Vincent
              last edited by

              @guy038

              Pre-release here

              Please test and let me know how it goes. You’ll need to manually install.

              Patrick FulstoneP 1 Reply Last reply Reply Quote 2
              • guy038G
                guy038
                last edited by

                Hello, @michael-vincent and All,

                I shouldn’t expect your immediate reply ;-)) Again, many thanks for this fix !

                So, I’ve just tested the x86 version, only, and all options are OK ! The highlighting of selected text is kept when pasted, for instance, in Word :-))

                Cheers,

                guy038

                1 Reply Last reply Reply Quote 2
                • Patrick FulstoneP
                  Patrick Fulstone @Michael Vincent
                  last edited by

                  @Michael-Vincent Can you re-share that pre-release?
                  The ‘Pre-release here’ link doesn’t seem to work.

                  1 Reply Last reply Reply Quote 0
                  • PeterJonesP
                    PeterJones
                    last edited by guy038

                    @Patrick-Fulstone said:

                    Can you re-share that pre-release? The ‘Pre-release here’ link doesn’t seem to work.

                    Looks like the reason it doesn’t exist is because @chcg merged @Michael-Vincent’s pull request, and there is a new official / released tag for NppExport v0.2.9.21. You should be able to download the appropriate x86 or x64 zip, and install it over your existing NppExport, and hopefully that will work for you.

                    1 Reply Last reply Reply Quote 2
                    • Michael VincentM
                      Michael Vincent
                      last edited by

                      @Patrick-Fulstone

                      Yes, @PeterJones is correct, I removed my forked repo after the pull request. This is the official version

                      Carl WitthoftC 1 Reply Last reply Reply Quote 2
                      • Carl WitthoftC
                        Carl Witthoft @Michael Vincent
                        last edited by

                        @Michael-Vincent Version 0.30, 32-bit, does not work for me, Npp 7.7 on Windows 10 . However, updating to Npp7.8.1 does allow Nppexport to work. So no problem here, but other users may want to update.

                        1 Reply Last reply Reply Quote 2
                        • First post
                          Last post
                        The Community of users of the Notepad++ text editor.
                        Powered by NodeBB | Contributors