Community
    • Login

    Notepad++ release 8.6.4

    Scheduled Pinned Locked Moved Announcements
    25 Posts 9 Posters 12.3k 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.
    • CoisesC
      Coises @pnedev
      last edited by Coises

      @pnedev said in Notepad++ release 8.6.4:

      Is scnNotification->nmhdr.hwndFrom trully the buffer ID or it is the window handle?

      It is the BufferID — I can verify because my plugin code uses it.

      For Replace All, one NPPN_GLOBALMODIFIED message is sent after the replace is complete.

      For Replace All in All Open Files, one NPPN_GLOBALMODIFIED is sent for each modified file. Since I have to process visible files (not just the active tab, but files visible in either view) differently than files that are open but not currently visible, I use this code to tell the difference:

      UINT_PTR bufferID = reinterpret_cast<UINT_PTR>(nmhdr->hwndFrom);
      intptr_t cdi1 = SendMessage(nppData._nppHandle, NPPM_GETCURRENTDOCINDEX, 0, 0);
      intptr_t cdi2 = SendMessage(nppData._nppHandle, NPPM_GETCURRENTDOCINDEX, 0, 1);
      bool visible1 = cdi1 < 0 ? false : bufferID == static_cast<UINT_PTR>(SendMessage(nppData._nppHandle, NPPM_GETBUFFERIDFROMPOS, cdi1, 0));
      bool visible2 = cdi2 < 0 ? false : bufferID == static_cast<UINT_PTR>(SendMessage(nppData._nppHandle, NPPM_GETBUFFERIDFROMPOS, cdi2, 1));
      if (visible1 || visible2) {
          // code for visible files
      }
      else {
          // code for tabs that are not visible
      }
      

      Edit: There was a problem with the code I posted originally; when a cloned tab was visible only in the second view, it was not detected as visible. The above code might not be perfect yet, but it does fix that mistake.

      1 Reply Last reply Reply Quote 4
      • donhoD
        donho
        last edited by

        @pnedev

        Is scnNotification->nmhdr.hwndFrom trully the buffer ID or it is the window handle?

        It is the BufferID — I can verify because my plugin code uses it.

        I confirm the reply of @Coises .
        NPPN_GLOBALMODIFIED could be triggered from different buffers while Replace All in all opened documents. So we use nmhdr.hwndFrom for containing BufferID. And nmhdr.idFrom value 0 for Relace All operation.

        Artur HarisonA 1 Reply Last reply Reply Quote 2
        • Artur HarisonA
          Artur Harison @donho
          last edited by

          Little problem in Shortcut Mapper
          English keyboard layout ignored case for filter.
          But other layouts are required.

          1 Reply Last reply Reply Quote 0
          • vad RV
            vad R
            last edited by

            Notepad++ crashes when I type. In the event log:
            Faulting application name: notepad++.exe, version: 8.6.4.0, time stamp: 0x65d3e0e7
            Faulting module name: ntdll.dll, version: 10.0.19041.3996, time stamp: 0x39215800
            Exception code: 0xc0000374
            Fault offset: 0x00000000000ff349
            Faulting process id: 0x47aa0
            Faulting application start time: 0x01da6f301f541163
            Faulting application path: C:\Program Files\Notepad++\notepad++.exe
            Faulting module path: C:\WINDOWS\SYSTEM32\ntdll.dll
            Report Id: e2b69282-7440-40fe-8ae2-6b605d543839
            Faulting package full name:
            Faulting package-relative application ID:

            Bu trying older versions I found that this started after "Notepad++ 8.3.3 (Make Apps, not war) " - i.e. in 8.3.3 it does not crash, but in 8.4 and every later one it crashes in the same manner. I open empty file, type about 5-7 characters, and the window disappears from the screen.

            PeterJonesP 1 Reply Last reply Reply Quote 0
            • PeterJonesP
              PeterJones @vad R
              last edited by PeterJones

              @vad-R ,

              Bu trying older versions I found that this started after "Notepad++ 8.3.3 (Make Apps, not war) " - i.e. in 8.3.3 it does not crash, but in 8.4 and every later one it crashes in the same manner.

              Thus, it is not a problem specific to the release of v8.6.4, and doesn’t belong in this discussion. The “Notepad++ release 8.6.4” Topic is only for issues that came about in v8.6.4 that didn’t exist in any version before v8.6.4.

              I am using my moderator powers to make a copy of your post in the Help Wanted section – at https://community.notepad-plus-plus.org/topic/25557/notepad-crash-v8-4-through-v8-6-4 – where we can further discuss your particular issues before you make an official bug report. Please go there if you have anything more to say about this issue.

              1 Reply Last reply Reply Quote 3
              • donhoD donho referenced this topic on
              • donhoD donho referenced this topic on
              • donhoD donho referenced this topic on
              • donhoD donho unpinned this topic on
              • EkopalypseE Ekopalypse referenced this topic on
              • PeterJonesP PeterJones locked this topic on
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors