Community
    • Login

    Enter key duplicated in macros

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    14 Posts 3 Posters 256 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.
    • László BotkaL
      László Botka
      last edited by

      In version 8.9 (32 bit, installed or portable) using an old macro, every Enter is executing two times. 8.8.8 and 8.8.9 works fine.
      In case of new macros the macro playback or a freshly saved recorded macro works fine in the same session.
      After restarting the npp, the newly created macros do not work properly.

      Commenting out plugins folder doesn’t help.

      datatraveller1D xomxX 2 Replies Last reply Reply Quote 3
      • datatraveller1D
        datatraveller1 @László Botka
        last edited by

        I can confirm the issue with version 8.9 (64bit) and an old macro,
        -> Should probably be noted here: https://community.notepad-plus-plus.org/topic/27327/notepad-release-8-9/24

        1 Reply Last reply Reply Quote 2
        • xomxX
          xomx @László Botka
          last edited by

          @László-Botka
          It’s due to this v8.9 commit (I reported it to the author):
          https://github.com/notepad-plus-plus/notepad-plus-plus/commit/b9df41ad3354c0657ab7762a4a5b5a0991a6d1d8

          datatraveller1D 1 Reply Last reply Reply Quote 1
          • xomxX xomx referenced this topic on
          • datatraveller1D
            datatraveller1 @xomx
            last edited by datatraveller1

            @xomx
            With my macro, the result with v.8.8.9 used to be correctly with CRLF:
            f18bc0b5-b3ab-41ea-82d1-396723550dd7-image.png

            With v8.9, now LF is used with one superfluous preceding each line:
            e0d91873-af9f-43f0-9e18-87554fad2eb8-image.png

            xomxX 2 Replies Last reply Reply Quote 1
            • xomxX
              xomx @datatraveller1
              last edited by xomx

              @datatraveller1 said in Enter key duplicated in macros:

              With v8.9, now LF is used with one superfluous preceding each line

              Yes, we know. For further details you can see discussion below this post:
              https://github.com/notepad-plus-plus/notepad-plus-plus/pull/17233#issuecomment-3707224810

              In N++ v8.9 has started (without specific N++ release announcement) long awaited replacement of the old obsolete tinyxml library. Now there is a completely new N++ xml layer code allowing also transparent xml-libraries switching independence (in the future, if needed, pugixml lib has been already tested). Benefits are many, here you can check e.g. the xml-handling code speed-up and memory saving (compare tinyxml vs tinyxml-2 there): https://pugixml.org/benchmark.html

              That transition is not even complete yet. And given the amount of new relevant code, it’s no wonder that there is at least one such xml-regression.

              1 Reply Last reply Reply Quote 3
              • xomxX
                xomx @datatraveller1
                last edited by

                @datatraveller1
                @László-Botka

                There is a fix PR Notepad++.exe binary you can test (for me, it works ok):
                https://github.com/notepad-plus-plus/notepad-plus-plus/actions/runs/20680668193/artifacts/5014383401

                datatraveller1D László BotkaL 3 Replies Last reply Reply Quote 1
                • datatraveller1D
                  datatraveller1 @xomx
                  last edited by

                  @xomx For me, the fix does not work yet (same result as before with v8.9).
                  BTW, not sure if needed, but here is the is interesting part of the old macro in shortcuts.xml:
                  be1f0f30-7452-4f1d-b098-6227cbba4294-image.png

                  xomxX 1 Reply Last reply Reply Quote 0
                  • xomxX
                    xomx @datatraveller1
                    last edited by

                    @datatraveller1

                    As for the doubling of the 2170 messages:
                    https://github.com/notepad-plus-plus/notepad-plus-plus/pull/17233#issuecomment-3707329328

                    Could you please post here your shortcuts.xml testing macro to I can debug your case?

                    datatraveller1D 1 Reply Last reply Reply Quote 0
                    • László BotkaL
                      László Botka @xomx
                      last edited by

                      @xomx
                      No change using the downloaded exe. Here is my test macro c1 :

                              </Macro>
                              <Macro name="c1" Ctrl="no" Alt="no" Shift="no" Key="0">
                                  <Action type="0" message="2345" wParam="0" lParam="0" sParam=""/>
                                  <Action type="1" message="2170" wParam="0" lParam="0" sParam="
                      "/>
                                  <Action type="1" message="2170" wParam="0" lParam="0" sParam="
                      "/>
                              </Macro>
                      
                      
                      1 Reply Last reply Reply Quote 2
                      • László BotkaL
                        László Botka @xomx
                        last edited by

                        @xomx Here is the image for showing eols

                        20260104 075009-D__Soft_Notepad++P_shortcuts.xml - Notepad++.jpg

                        1 Reply Last reply Reply Quote 2
                        • datatraveller1D
                          datatraveller1 @xomx
                          last edited by

                          @xomx It is difficult to post here, because the EOL characters aren’t depicted correctly, but I think you can simply reproduce the issue: Record a new macro with v8.8.9 and type the following three lines pressing ENTER after each line:

                          line1
                          line2
                          line3
                          

                          Then save the macro as “testcrlf”.

                          Result when executing the macro with v8.8.9:
                          c01c1215-34ba-40ef-a4d4-f32d217d4742-image.png

                          Result when executing the macro with v8.9 (original and patched exe):
                          a9552437-54b3-467a-ba46-392fa76d3e95-image.png

                          BTW, strangely this time the superfluous LF are trailing (instead preceding with my old macro).

                          xomxX datatraveller1D 2 Replies Last reply Reply Quote 2
                          • xomxX
                            xomx @datatraveller1
                            last edited by

                            @datatraveller1 @László-Botka

                            Thanks for the tests.
                            I currently cannot check it myself but the PR fix author @ozone10 found the culprit (tinyxml-2 xml standard EOL normalization), so it will need more for a fix.
                            See: https://github.com/notepad-plus-plus/notepad-plus-plus/pull/17357#issuecomment-3707930342

                            1 Reply Last reply Reply Quote 1
                            • datatraveller1D
                              datatraveller1 @datatraveller1
                              last edited by datatraveller1

                              What does seem to work now only with the new patched exe:
                              Freshly created macros with this version are also compatible with earlier Notepad++ versions.

                              4a2bdea7-9a01-407c-9810-4e2ff8ea7a61-image.png

                              Hex values (xDxA) seem to be used now correctly for CRLF.

                              However, the old macros get converted to two LF (“&#xA”):

                              13656a91-c1e1-40f5-b768-9a2e181bcb70-image.png

                              datatraveller1D 1 Reply Last reply Reply Quote 0
                              • datatraveller1D
                                datatraveller1 @datatraveller1
                                last edited by datatraveller1

                                So with installation of a new notepad 8.9 version, these settings in shortcuts.xml should be updated (maybe automatically with installation):

                                from:
                                1c3beaba-3b9c-46be-8fff-2f9dace10a63-image.png

                                to:
                                f08a7ae4-6d8d-486a-89b2-57b79dee1091-image.png

                                I’m only a user so I don’t know the details, but maybe simply CR could be changed to &#xD; and CRLF to &#xA; (and if existent LF to &#xA;)?

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