<?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[Remove duplicate numerical lines]]></title><description><![CDATA[<p dir="auto">Remove duplicate numerical lines</p>
<p dir="auto">the type of duplicate data is</p>
<p dir="auto">5.8,7.9,5.7,0.1,2.3,0.1,2.8,0.1,2.9,5.0,1.2,5.0,1.2,7.0,1.5,0.1,1.6,5.0,1.8,5.0,2.8,5.0,1.9,0.1,3.4,5.0,3.1,0.1,1.2,7.0,2.7,5.0,2<br />
7.3,2.6,5.7,0.1,3.6,0.1,2.7,5.0,2.0,5.0,1.5,2.0,1.2,8.0,1.2,2.0,1.9,5.0,1.5,7.0,2.3,5.0,1.9,5.0,4.3,5.0,4.5,0.1,1.4,2.0,2.2,5.0,1<br />
7.2,6.6,5.7,0.1,2.8,0.1,2.8,0.1,2.4,0.1,1.3,8.0,1.2,7.0,1.3,3.0,1.7,8.0,1.7,2.0,2.5,5.0,1.9,0.1,3.9,0.1,4.5,0.1,1.3,3.0,2.5,0.1,0<br />
4.5,5.5,5.7,0.1,1.7,5.0,3.3,0.1,3.9,0.1,1.1,3.0,1.1,8.0,1.8,7.0,1.5,5.0,2.1,0.1,3.5,5.0,2.1,0.1,2.7,5.0,1.6,0.1,1.1,7.0,3.4,0.1,2<br />
4.3,3.3,2.7,0.1,1.3,2.0,4.1,0.1,7.1,0.1,1.0,4.0,1.1,1.0,2.3,0.1,1.6,3.0,1.8,7.0,4.6,0.1,2.0,5.0,2.3,0.1,9.1,0.1,1.1,1.0,4.1,0.1,0<br />
5.8,7.9,5.7,0.1,2.3,0.1,2.8,0.1,2.9,5.0,1.2,5.0,1.2,7.0,1.5,0.1,1.6,5.0,1.8,5.0,2.8,5.0,1.9,0.1,3.4,5.0,3.1,0.1,1.2,7.0,2.7,5.0,2<br />
7.3,2.6,5.7,0.1,3.6,0.1,2.7,5.0,2.0,5.0,1.5,2.0,1.2,8.0,1.2,2.0,1.9,5.0,1.5,7.0,2.3,5.0,1.9,5.0,4.3,5.0,4.5,0.1,1.4,2.0,2.2,5.0,1<br />
7.2,6.6,5.7,0.1,2.8,0.1,2.8,0.1,2.4,0.1,1.3,8.0,1.2,7.0,1.3,3.0,1.7,8.0,1.7,2.0,2.5,5.0,1.9,0.1,3.9,0.1,4.5,0.1,1.3,3.0,2.5,0.1,0<br />
4.5,5.5,5.7,0.1,1.7,5.0,3.3,0.1,3.9,0.1,1.1,3.0,1.1,8.0,1.8,7.0,1.5,5.0,2.1,0.1,3.5,5.0,2.1,0.1,2.7,5.0,1.6,0.1,1.1,7.0,3.4,0.1,2<br />
4.3,3.3,2.7,0.1,1.3,2.0,4.1,0.1,7.1,0.1,1.0,4.0,1.1,1.0,2.3,0.1,1.6,3.0,1.8,7.0,4.6,0.1,2.0,5.0,2.3,0.1,9.1,0.1,1.1,1.0,4.1,0.1,0</p>
<p dir="auto">how to remove dublicate lines?some help please</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/16785/remove-duplicate-numerical-lines</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Jul 2026 03:18:00 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/16785.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 12 Dec 2018 17:59:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Remove duplicate numerical lines on Thu, 27 Dec 2018 19:24:24 GMT]]></title><description><![CDATA[<p dir="auto">i miss you too <a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a> and i hope you read this some day.</p>
<p dir="auto">i’m sorry too for everything that happened and my failed humorous attempts to brighten up the situation.</p>
<p dir="auto">i think that don didn’t even look to whom he gave this reply at that certain moment, and i know how this must feel … like a job where a 3 year “underpaid” employee, who is also probably the biggest defender and supporter of this hypothetical company, suddenly gets a “who the hell are you” from the boss.</p>
<p dir="auto">please come back, or more important: we, specifically i as an individual would like to keep in contact, regardless of how, when or where.</p>
<p dir="auto">thanks <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> for standing up.<br />
(i currently have a certain movie scene in my mind … “o captain my captain” from the movie dead poets society)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37826</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37826</guid><dc:creator><![CDATA[Meta Chuh]]></dc:creator><pubDate>Thu, 27 Dec 2018 19:24:24 GMT</pubDate></item><item><title><![CDATA[Reply to Remove duplicate numerical lines on Thu, 27 Dec 2018 17:30:08 GMT]]></title><description><![CDATA[<p dir="auto">I have sent a private apology to <a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a>, but I thought I should also make a public apology: downvotes aren’t something to joke with (or about), and my initial response (after I had seen it bothered him) was still couched in humor (and probably not very funny, at that), when it should not have had any attempts at justification or humor.  I have been sorry for my poor choices on that day since I saw his response, and I have been saddened as he has stayed away for the last two weeks.  I wish I knew how to make it up to him, but saying that I’m sorry is all that I know to do.</p>
<p dir="auto">I highly respect Scott, and value his contributions to this forum.  I hope he will come back and participate again.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37825</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37825</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 27 Dec 2018 17:30:08 GMT</pubDate></item><item><title><![CDATA[Reply to Remove duplicate numerical lines on Sat, 15 Dec 2018 21:06:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a></p>
<p dir="auto">I did some tests concerning the performance and memory usage about calculating whether the last line contains an eol or not.<br />
I opened a ~600MB file and run the following script</p>
<pre><code>from Npp import editor
import time

start = time.time()
lastLineContainsEOL = True if len(editor.getLine(editor.getLineCount()-1)) == 0 else False
end = time.time() - start
print 'getLine:', end

start = time.time()
lastLineContainsEOL = True if editor.getText()[-1] in '\n\r' else False
end = time.time() - start
print 'getText:', end

start = time.time()
lastLineContainsEOL = True if editor.getCharacterPointer()[-1] in '\n\r' else False
end = time.time() - start
print 'getCharacterPointer:', end
</code></pre>
<p dir="auto">which resulted in</p>
<pre><code>getLine: 0.000999927520752
getText: 2.94100022316
getCharacterPointer: 0.641000032425
</code></pre>
<p dir="auto">then I did the same test while watching the performance monitor and saw that<br />
editor.getText()[-1] allocated an additional 600 MB whereas editor.getCharacterPointer()[-1]  didn’t.</p>
<p dir="auto">So, currently it seems that len(editor.getLine(editor.getLineCount()-1)) == 0 is the fastest and best on resources<br />
whereas getCharacterPointer might be a fast way to access the buffer as long as you know what you are looking for.</p>
<p dir="auto">Eko</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37628</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37628</guid><dc:creator><![CDATA[Eko palypse]]></dc:creator><pubDate>Sat, 15 Dec 2018 21:06:04 GMT</pubDate></item><item><title><![CDATA[Reply to Remove duplicate numerical lines on Fri, 14 Dec 2018 22:02:04 GMT]]></title><description><![CDATA[<p dir="auto">I was looking at the EOL at EOF thing and I liked the scripts presented in regards to same.  However, after the script is in place…what if I WANT to create a file without the final EOL, a very occasional need maybe?</p>
<p dir="auto">So I came up with this few lines of code that can be inserted into the scripts, which will prevent the script from doing anything if the Alt key is held while a save is being done.</p>
<pre><code>import ctypes
VK_MENU = VK_ALT = 0x12
if ctypes.windll.user32.GetKeyState(VK_ALT) &amp; 0x8000: return
</code></pre>
<p dir="auto">In practice this only works when Save or SaveAll is done via toolbar button. :)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37600</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37600</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 14 Dec 2018 22:02:04 GMT</pubDate></item><item><title><![CDATA[Reply to Remove duplicate numerical lines on Fri, 14 Dec 2018 15:40:47 GMT]]></title><description><![CDATA[<p dir="auto">@gurikbal-singh</p>
<p dir="auto">Thank you very much for your effort but I wasn’t asking for one,<br />
I offered a possible solution by using the pythonscript plugin<br />
but maybe <a class="plugin-mentions-user plugin-mentions-a" href="/user/rizla-kostas" aria-label="Profile: rizla-kostas">@<bdi>rizla-kostas</bdi></a>, the original poster, finds this useful.</p>
<p dir="auto">Eko</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37583</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37583</guid><dc:creator><![CDATA[Eko palypse]]></dc:creator><pubDate>Fri, 14 Dec 2018 15:40:47 GMT</pubDate></item><item><title><![CDATA[Reply to Remove duplicate numerical lines on Fri, 14 Dec 2018 15:37:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eko-palypse" aria-label="Profile: Eko-palypse">@<bdi>Eko-palypse</bdi></a><br />
zip file has contain a plugin for you<br />
this plugin can remove duplicate lines</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37582</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37582</guid><dc:creator><![CDATA[rinku singh]]></dc:creator><pubDate>Fri, 14 Dec 2018 15:37:53 GMT</pubDate></item><item><title><![CDATA[Reply to Remove duplicate numerical lines on Fri, 14 Dec 2018 15:32:54 GMT]]></title><description><![CDATA[<p dir="auto">@gurikbal-singh</p>
<p dir="auto">not sure what to do!?? What about the uploaded zip?</p>
<p dir="auto">Eko</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37581</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37581</guid><dc:creator><![CDATA[Eko palypse]]></dc:creator><pubDate>Fri, 14 Dec 2018 15:32:54 GMT</pubDate></item><item><title><![CDATA[Reply to Remove duplicate numerical lines on Fri, 14 Dec 2018 15:04:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eko-palypse" aria-label="Profile: Eko-palypse">@<bdi>Eko-palypse</bdi></a><br />
<a href="https://drive.google.com/file/d/1i3xhDiybd6FWb0hC2Pu72oeCQEhTYF4W/view?usp=sharing" rel="nofollow ugc">https://drive.google.com/file/d/1i3xhDiybd6FWb0hC2Pu72oeCQEhTYF4W/view?usp=sharing</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/37576</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37576</guid><dc:creator><![CDATA[rinku singh]]></dc:creator><pubDate>Fri, 14 Dec 2018 15:04:03 GMT</pubDate></item><item><title><![CDATA[Reply to Remove duplicate numerical lines on Fri, 14 Dec 2018 12:15:40 GMT]]></title><description><![CDATA[<p dir="auto">This is where real life and software development goes hand in hand - you can’t make everyone happy.</p>
<p dir="auto">Eko</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37565</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37565</guid><dc:creator><![CDATA[Eko palypse]]></dc:creator><pubDate>Fri, 14 Dec 2018 12:15:40 GMT</pubDate></item><item><title><![CDATA[Reply to Remove duplicate numerical lines on Thu, 13 Dec 2018 23:27:08 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></p>
<blockquote>
<p dir="auto">transition to 7.6. Hopefully, it will mellow out again soon.</p>
</blockquote>
<p dir="auto">i think i’m afraid not.<br />
there have been new complaints that, now that all plugins reside at a single, all users accessible  location inside %programdata% as the active posters wished, others that were silent before want it either in a different location or the way it was in 7.6 … or the way it was in 7.5.9 … or inside of %programfiles%</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37547</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37547</guid><dc:creator><![CDATA[Meta Chuh]]></dc:creator><pubDate>Thu, 13 Dec 2018 23:27:08 GMT</pubDate></item><item><title><![CDATA[Reply to Remove duplicate numerical lines on Thu, 13 Dec 2018 22:23:10 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">I’m super unpopular</p>
</blockquote>
<p dir="auto">… says the one who has 70% higher reputation than anyone else in these forums. :-)  Fortunately, downvotes can be transitory: 'Twas done as a joke, referring back to the time that the interface made it look like I had downvoted Scott.  But my real downvotes are reserved for egregious behavior – posting spam in the forums, primarily – so I removed this one.</p>
<p dir="auto">And yes, it does seem to have been rather rough in the forums recently: gang up on Scott this week; last week, I got so frustrated due to a certain conversation that I was within moments of deciding to not bother reading/posting here; and, I’m sure Don hasn’t had the best time, with all the problems that showed up in the transition to 7.6.   Hopefully, it will mellow out again soon.</p>
<p dir="auto">Anyway, I learned a lot through all the code examples and the experiments they prompted.  Thanks all.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37538</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37538</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 13 Dec 2018 22:23:10 GMT</pubDate></item><item><title><![CDATA[Reply to Remove duplicate numerical lines on Thu, 13 Dec 2018 21:54:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a>:</p>
<p dir="auto">don’t worry, you’re not … i’m currently googling for a specific helping hack:</p>
<p dir="auto">nodebb plugin hack that downvotes from specific users triggers a double upvote<br />
(alternative: hack that there are two upvote buttons left and right of the counter for specific user accounts)</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a></p>
<p dir="auto">also don’t worry, i’m currently googling for a specific helping hack:</p>
<p dir="auto">nodebb browser hack that specific users, who refuse to post scripts, are unable to close the np++ browser window ever again<br />
(alternative: they can close it, but as soon as they do, the same page will pop up on their cellular phones)</p>
<p dir="auto">looool ;-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37536</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37536</guid><dc:creator><![CDATA[Meta Chuh]]></dc:creator><pubDate>Thu, 13 Dec 2018 21:54:08 GMT</pubDate></item><item><title><![CDATA[Reply to Remove duplicate numerical lines on Thu, 13 Dec 2018 21:45:50 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></p>
<blockquote>
<p dir="auto">valid reason to downvote</p>
</blockquote>
<p dir="auto">First labeled a “retard”, then spanked vigorously by Don Ho in perhaps an interesting overreaction…and now downvoted by Peter…  I’m super unpopular.  :-(</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37534</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37534</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Thu, 13 Dec 2018 21:45:50 GMT</pubDate></item><item><title><![CDATA[Reply to Remove duplicate numerical lines on Thu, 13 Dec 2018 21:40:11 GMT]]></title><description><![CDATA[<p dir="auto">I’m on 7.5.8 32-bit, with PythonScript 1.3.0.0…</p>
<p dir="auto">And now <a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a> has actually given me a valid reason to downvote him, because if he stops posting PythonScript, it will be up to me… and I just don’t have the py-knowledge to keep up for long. :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37532</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37532</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 13 Dec 2018 21:40:11 GMT</pubDate></item><item><title><![CDATA[Reply to Remove duplicate numerical lines on Thu, 13 Dec 2018 20:51:46 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:</p>
<blockquote>
<p dir="auto">To continue with the hijack-tangent of this thread… :-)</p>
</blockquote>
<p dir="auto">hahahaha, i like … word of the day: hijack-tangent ;-D 👍</p>
<p dir="auto">it’s really refreshing, it is different to other bbs’es where this kind of thought exchange is and has to be done via the bbs’ chat and pm systems, often leaving a sterile one post product at the end without any leads how the author(s) got there.</p>
<p dir="auto">i think this can be very useful to new interested users to get a better grip of how much time you really need to think about a seemingly simple task and/or consult with others to get a good or perfected result within a short period of time.</p>
<p dir="auto">and i guess no one could come up with a good and plausible reason to mind about this kind of hijacking anyways.<br />
especially because the op is probably happy since yesterday and the rest is a nice brain storming, coding, testing and sharing.</p>
<p dir="auto"><strong>aaaaand</strong> … my post (this one) was the real hijacking … lol</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37527</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37527</guid><dc:creator><![CDATA[Meta Chuh]]></dc:creator><pubDate>Thu, 13 Dec 2018 20:51:46 GMT</pubDate></item><item><title><![CDATA[Reply to Remove duplicate numerical lines on Thu, 13 Dec 2018 20:14:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a></p>
<p dir="auto">No, no, no … don’t do that … forget all about I wrote :-)<br />
It never happened - everything is good - bright nice day<br />
and bugs are just animals :-)</p>
<p dir="auto">Eko</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37526</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37526</guid><dc:creator><![CDATA[Eko palypse]]></dc:creator><pubDate>Thu, 13 Dec 2018 20:14:01 GMT</pubDate></item><item><title><![CDATA[Reply to Remove duplicate numerical lines on Thu, 13 Dec 2018 20:11:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eko-palypse" aria-label="Profile: Eko-palypse">@<bdi>Eko-palypse</bdi></a> <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a></p>
<p dir="auto">I guess I will stop posting scripts now…let others do the heavy lifting.  :-)</p>
<p dir="auto">…unless and until I move to a newer N++…</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37525</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37525</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Thu, 13 Dec 2018 20:11:45 GMT</pubDate></item><item><title><![CDATA[Reply to Remove duplicate numerical lines on Thu, 13 Dec 2018 20:05:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a></p>
<p dir="auto">I’m in the same position as <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> - only the current active file<br />
does get the eol added.<br />
PS 1.3<br />
Npp 7.5.9</p>
<p dir="auto">Eko</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37523</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37523</guid><dc:creator><![CDATA[Eko palypse]]></dc:creator><pubDate>Thu, 13 Dec 2018 20:05:33 GMT</pubDate></item><item><title><![CDATA[Reply to Remove duplicate numerical lines on Thu, 13 Dec 2018 19:54:29 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></p>
<p dir="auto">So to revisit <em>this</em>:</p>
<blockquote>
<p dir="auto">if all open files were missing EOL, it would save all files, but only fix the EOL on the active file</p>
</blockquote>
<p dir="auto">I just re-tested after disabling my more-complicated script, restarting N++, and then activating my script as posted above.  I created 3 new named files and make sure each had only a single line of text (only a 1 showing in the line-number margin–thus NO line-ending at end-of-buffer, or anywhere in the buffer for that matter).  I activated a different file from these 3 and pressed the <em>Save All</em> toolbar button.  Checking all 3 files in turn I found that all had a line 2 in the line number margin and this were all appropriately affected by my callback script.</p>
<p dir="auto">Not sure why you would see different behavior.  I’m running PS 1.3.0.0 and N++ 7.2.2, which for the latter, I’m confident you are <em>not</em>…  ;-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37522</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37522</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Thu, 13 Dec 2018 19:54:29 GMT</pubDate></item><item><title><![CDATA[Reply to Remove duplicate numerical lines on Thu, 13 Dec 2018 19:39:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a></p>
<p dir="auto">not sure I understand your concerns about this.<br />
I assume it is only the pointer to the text buffer returned and pythonscript<br />
plugin has the python buffer protocol implemented so it should be safe always.<br />
But as written, I <strong>assume</strong> - don’t really know how it is implemented.</p>
<p dir="auto">Eko</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37521</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37521</guid><dc:creator><![CDATA[Eko palypse]]></dc:creator><pubDate>Thu, 13 Dec 2018 19:39:13 GMT</pubDate></item><item><title><![CDATA[Reply to Remove duplicate numerical lines on Thu, 13 Dec 2018 19:32:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eko-palypse" aria-label="Profile: Eko-palypse">@<bdi>Eko-palypse</bdi></a></p>
<p dir="auto">I get nervous about <code>editor.getCharacterPointer()</code> because of my lack of full understanding about multibyte character encodings (as stated previously, I’m an A-Z person).  I suppose, though, in this case we are talking about, there could be no issues…</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37519</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37519</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Thu, 13 Dec 2018 19:32:33 GMT</pubDate></item><item><title><![CDATA[Reply to Remove duplicate numerical lines on Thu, 13 Dec 2018 19:08:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a></p>
<p dir="auto">yes, that is what I like about open source project in general.<br />
Everyone can learn from others from different point of views or styles etc …</p>
<blockquote>
<p dir="auto">Yes, but you forgot something. :-)</p>
</blockquote>
<p dir="auto">Correct, different size - damn it. :-)</p>
<blockquote>
<p dir="auto">editor.getText()[-1]<br />
but maybe that pulls a lot of text just to look at the last character…</p>
</blockquote>
<p dir="auto">I thought so too but after rechecking scintilla documentation it looks like<br />
<a href="https://www.scintilla.org/ScintillaDoc.html#SCI_GETCHARACTERPOINTER" rel="nofollow ugc">SCI_GETCHARACTERPOINTER</a> is what we are looking for because from the document it states<br />
<em><strong>Grant temporary direct read-only access to the memory used by Scintilla to store the document.</strong></em></p>
<p dir="auto">So, editor.getCharacterPointer()[-1] shouldn’t allocate any heap memory at all or maybe just a little tiny bit.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> nice one - works for me as well :-)</p>
<p dir="auto">Eko</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37517</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37517</guid><dc:creator><![CDATA[Eko palypse]]></dc:creator><pubDate>Thu, 13 Dec 2018 19:08:25 GMT</pubDate></item><item><title><![CDATA[Reply to Remove duplicate numerical lines on Thu, 13 Dec 2018 18:47:53 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:</p>
<blockquote>
<p dir="auto">the oldID=activeID, activate(args), edit, activate(oldID) should work</p>
</blockquote>
<p dir="auto">Yea, I had something like that (but even more involved) in my original over-complicated version (mentioned yesterday, originally), but I found some cases where even that didn’t always work right…so I cut it out entirely before posting.  Maybe I’ll revisit it…</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37516</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37516</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Thu, 13 Dec 2018 18:47:53 GMT</pubDate></item><item><title><![CDATA[Reply to Remove duplicate numerical lines on Thu, 13 Dec 2018 18:44:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eko-palypse" aria-label="Profile: Eko-palypse">@<bdi>Eko-palypse</bdi></a></p>
<p dir="auto">So we all learn from each other here.  My favorite line from your script is this one:</p>
<p dir="auto"><code>lastLineContainsEOL = True if len(editor.getLine(editor.getLineCount()-1)) == 0 else False</code></p>
<p dir="auto">In my “<code>callback_npp_FILEBEFORESAVE</code>” script I did it differently…but I like your method, too.</p>
<p dir="auto">Thinking more about it now, you could also do it like this:</p>
<p dir="auto"><code>lastLineContainsEOL = True if editor.getText()[-1] in '\n\r' else False</code></p>
<p dir="auto">but maybe that pulls a <em>lot</em> of text just to look at the last character…</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37515</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37515</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Thu, 13 Dec 2018 18:44:03 GMT</pubDate></item></channel></rss>