<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Notification on update document without saving]]></title><description><![CDATA[<p dir="auto">What’s <code>NPPN_</code> constant using for notify at update document without saving?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/19569/notification-on-update-document-without-saving</link><generator>RSS for Node</generator><lastBuildDate>Fri, 14 Aug 2026 03:31:56 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/19569.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 17 Jun 2020 23:22:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Notification on update document without saving on Thu, 18 Jun 2020 19:53:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a> The question is, do I correctly catch notifications or is there a better solution?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/55128</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/55128</guid><dc:creator><![CDATA[WinterSilence]]></dc:creator><pubDate>Thu, 18 Jun 2020 19:53:47 GMT</pubDate></item><item><title><![CDATA[Reply to Notification on update document without saving on Thu, 18 Jun 2020 19:48:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wintersilence" aria-label="Profile: WinterSilence">@<bdi>WinterSilence</bdi></a></p>
<p dir="auto">I don’t think anybody is going to “check your Pascal code”.<br />
If you have a specific question about something relating to it, that is different…but you’re going to have to come out and actually ask the question.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/55127</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/55127</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 18 Jun 2020 19:48:16 GMT</pubDate></item><item><title><![CDATA[Reply to Notification on update document without saving on Thu, 18 Jun 2020 19:42:48 GMT]]></title><description><![CDATA[<p dir="auto">Need help, I dont work in Delphi 5-6 years and remembered only base, please check my <strong>Pascal</strong> code(Delphi10) for <code>NppPlugin.pas</code>:</p>
<pre><code>constructor TNppPlugin.Create;
begin
  // filter: send notifications on insert text
  SendMessage(self.NppData.ScintillaMainHandle, SciSupport.SCI_SETMODEVENTMASK, SciSupport.SC_MOD_INSERTTEXT, 0);
  inherited;
end;

procedure TNppPlugin.BeNotified(sn: PSCNotification);
begin
  if (HWND(sn^.nmhdr.hwndFrom) = self.NppData.NppHandle) and (sn^.nmhdr.code = NPPN_TB_MODIFICATION) then
  begin
    self.DoNppnToolbarModification;
  end
  else
    if (HWND(sn^.nmhdr.hwndFrom) = self.NppData.NppHandle) and (sn^.nmhdr.code = NPPN_SHUTDOWN) then
    begin
        self.DoNppnShutdown;
    end
  else
    // catch notification on insert
    if (HWND(sn^.nmhdr.hwndFrom) == self.NppData.ScintillaMainHandle) and (sn.modificationType = SciSupport.SC_MOD_INSERTTEXT) and (sn^.nmhdr.code = SciSupport.SCN_MODIFIED) then
    begin
        self.DoNppnSciUpdate(sn);
    end;
end;

// overrides 
procedure TNppPlugin.DoNppnSciUpdate(sn: PSCNotification);
begin
  // @todo check sn.text and sn.position in sn.line to detect `/**` at line end 
end;
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/55126</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/55126</guid><dc:creator><![CDATA[WinterSilence]]></dc:creator><pubDate>Thu, 18 Jun 2020 19:42:48 GMT</pubDate></item><item><title><![CDATA[Reply to Notification on update document without saving on Thu, 18 Jun 2020 06:40:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wintersilence" aria-label="Profile: WinterSilence">@<bdi>WinterSilence</bdi></a> it’s better:</p>
<blockquote>
<p dir="auto">SCEN_CHANGE (768) is fired when the text (not the style) of the document changes. This notification is sent using the WM_COMMAND message on Windows and the “command” signal on GTK as this is the behaviour of the standard Edit control (SCEN_CHANGE has the same value as the Windows Edit control EN_CHANGE). No other information is sent. If you need more detailed information use SCN_MODIFIED. You can filter the types of changes you are notified about with SCI_SETMODEVENTMASK and SCI_SETCOMMANDEVENTS.</p>
</blockquote>
]]></description><link>https://community.notepad-plus-plus.org/post/55075</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/55075</guid><dc:creator><![CDATA[WinterSilence]]></dc:creator><pubDate>Thu, 18 Jun 2020 06:40:11 GMT</pubDate></item><item><title><![CDATA[Reply to Notification on update document without saving on Thu, 18 Jun 2020 06:36:01 GMT]]></title><description><![CDATA[<p dir="auto">I’m found:</p>
<blockquote>
<p dir="auto">SCN_MODIFIED<br />
This notification is sent when the text or styling of the document changes or is about to change. You can set a mask for the notifications that are sent to the container with SCI_SETMODEVENTMASK. The notification structure contains information about what changed, how the change occurred and whether this changed the number of lines in the document. No modifications may be performed while in a SCN_MODIFIED event.</p>
</blockquote>
]]></description><link>https://community.notepad-plus-plus.org/post/55074</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/55074</guid><dc:creator><![CDATA[WinterSilence]]></dc:creator><pubDate>Thu, 18 Jun 2020 06:36:01 GMT</pubDate></item><item><title><![CDATA[Reply to Notification on update document without saving on Thu, 18 Jun 2020 06:33:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/prahlad-makwana4145" aria-label="Profile: Prahlad-Makwana4145">@<bdi>Prahlad-Makwana4145</bdi></a></p>
<p dir="auto">Session notifications are sent by timer, not by updating doc text. I can check <code>SCI GETTEXT</code> by timer without this, but it’s 100% freeze npp+.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/55073</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/55073</guid><dc:creator><![CDATA[WinterSilence]]></dc:creator><pubDate>Thu, 18 Jun 2020 06:33:09 GMT</pubDate></item><item><title><![CDATA[Reply to Notification on update document without saving on Thu, 18 Jun 2020 05:18:02 GMT]]></title><description><![CDATA[<p dir="auto">Hello,<a class="plugin-mentions-user plugin-mentions-a" href="/user/wintersilence" aria-label="Profile: WinterSilence">@<bdi>WinterSilence</bdi></a></p>
<p dir="auto">New feature added in <strong>Notepad 6.6</strong> for which the release notes say:</p>
<ul>
<li>The main feature of this release is Session snapshot &amp; periodic backup. If this feature is enabled (enabled by default), user won’t be asked to save unsaved file as he quits Notepad++, and on startup Notepad++ restores the unsaved file and unsaved untitled document of last session.</li>
</ul>
<p dir="auto">This facility is controlled via <strong>menu =&gt; Settings =&gt; Preferences =&gt; Backup</strong>. For more details see also this section of the Notepad++ User Manual.</p>
<p dir="auto">I hope this information will be useful .<br />
Thank you.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/55072</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/55072</guid><dc:creator><![CDATA[Prahlad-Makwana4145]]></dc:creator><pubDate>Thu, 18 Jun 2020 05:18:02 GMT</pubDate></item><item><title><![CDATA[Reply to Notification on update document without saving on Thu, 18 Jun 2020 04:43:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> said in <a href="/post/55065">Notification on update document without saving</a>:</p>
<blockquote>
<p dir="auto">If you can clarify that</p>
</blockquote>
<p dir="auto">notification called on change text(<code>SCI_...TEXT</code> message) in active view</p>
]]></description><link>https://community.notepad-plus-plus.org/post/55071</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/55071</guid><dc:creator><![CDATA[WinterSilence]]></dc:creator><pubDate>Thu, 18 Jun 2020 04:43:22 GMT</pubDate></item><item><title><![CDATA[Reply to Notification on update document without saving on Wed, 17 Jun 2020 23:49:59 GMT]]></title><description><![CDATA[<p dir="auto">Notifications are documented <a href="https://npp-user-manual.org/docs/plugin-communication/#notepad-notifications" rel="nofollow ugc">https://npp-user-manual.org/docs/plugin-communication/#notepad-notifications</a></p>
<p dir="auto">I’m not sure what you mean by “at update document without saving”.  If you can clarify that…</p>
]]></description><link>https://community.notepad-plus-plus.org/post/55065</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/55065</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Wed, 17 Jun 2020 23:49:59 GMT</pubDate></item></channel></rss>