<?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[Why doesn&#x27;t a tab close return you to tab most recently worked in?]]></title><description><![CDATA[<p dir="auto">I’ve noticed an annoying-to-me Notepad++ behavior.</p>
<p dir="auto">Make a bunch of new editor tabs:<br />
<strong>new1</strong>  <strong>new2</strong>  <strong>new3</strong>  <strong>new4</strong>  <strong>new5</strong>  <strong>new6</strong></p>
<p dir="auto">Click on the <strong>new2</strong> tab as if you want to edit that “file”.</p>
<p dir="auto">Now click the little red X on the <strong>new5</strong> tab.</p>
<p dir="auto"><strong>new5</strong> closes and you are still in the editing area for the <strong>new2</strong> tab (good).</p>
<p dir="auto">So now we have:<br />
<strong>new1</strong>  <strong>new2</strong>  <strong>new3</strong>  <strong>new4</strong>  <strong>new6</strong></p>
<p dir="auto">Click on the <strong>new4</strong> tab as if you want to edit that “file” (but don’t make any edits).</p>
<p dir="auto">Now click the little red X on the <strong>new4</strong> tab.</p>
<p dir="auto"><strong>new4</strong> closes and you are taken to the editing area for the <strong>new6</strong> tab.</p>
<p dir="auto">I find this bad and wish I was returned to <strong>new2</strong> as that is where I was last working, not placed into <strong>new6</strong> apparently because it is the right-most tab.</p>
<p dir="auto">Is there a solution/workaround to this?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/14146/why-doesn-t-a-tab-close-return-you-to-tab-most-recently-worked-in</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Jul 2026 00:03:29 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/14146.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 14 Jul 2017 13:10:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Why doesn&#x27;t a tab close return you to tab most recently worked in? on Thu, 20 Jul 2017 06:24:16 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></p>
<p dir="auto">I guess that this patch would not have much objection.<br />
Since I have multiple patches that some of them will encounter objection I didn’t try to submit anything to mainline.</p>
<p dir="auto">Not sure exactly what are your expectation from the scenario you described and what will be the results but my guess is that when a document is moved to another view the source view should choose another document and that will probably happen using the same code I patched so this decision will be based on MRU ordering rather than tab ordering.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/25733</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/25733</guid><dc:creator><![CDATA[gstavi]]></dc:creator><pubDate>Thu, 20 Jul 2017 06:24:16 GMT</pubDate></item><item><title><![CDATA[Reply to Why doesn&#x27;t a tab close return you to tab most recently worked in? on Wed, 19 Jul 2017 12:50:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gstavi" aria-label="Profile: gstavi">@<bdi>gstavi</bdi></a></p>
<p dir="auto">I haven’t tried this, but thank you for your comment.</p>
<p dir="auto">What are the chances that something like this will get integrated into the main Notepad++ sources?  (I would launch a campaign for this!)</p>
<p dir="auto">I also noticed this other related scenario:</p>
<ul>
<li>Have 3 documents open in View 0 (main view) and View 1 (secondary view) unopened</li>
<li>Be editing in the leftmost (FIRST) editor tab</li>
<li>Right click editing tab for the THIRD editor tab</li>
<li>Choose “Move to other view” from the popup context menu</li>
</ul>
<p dir="auto">What will result is the THIRD document will move to View 1 as desired, but the <strong>active editor tab in View 0 will be set to the SECOND document tab instead of the FIRST</strong>.  <a class="plugin-mentions-user plugin-mentions-a" href="/user/gstavi" aria-label="Profile: gstavi">@<bdi>gstavi</bdi></a> , I wonder if your patch handles this situation as well?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/25708</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/25708</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 19 Jul 2017 12:50:23 GMT</pubDate></item><item><title><![CDATA[Reply to Why doesn&#x27;t a tab close return you to tab most recently worked in? on Sun, 16 Jul 2017 09:41:46 GMT]]></title><description><![CDATA[<p dir="auto">If you want to build Notepad++ by yourself, here is a patch for this:<br />
<a href="https://github.com/gstavi/npp/blob/master/patch/0005-Use-MRU-when-choosing-new-file-to-activate-after-clo.patch" rel="nofollow ugc">Use-MRU-when-choosing-new-file-to-activate-after-clo.patch</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/25629</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/25629</guid><dc:creator><![CDATA[gstavi]]></dc:creator><pubDate>Sun, 16 Jul 2017 09:41:46 GMT</pubDate></item><item><title><![CDATA[Reply to Why doesn&#x27;t a tab close return you to tab most recently worked in? on Fri, 14 Jul 2017 13:50:32 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></p>
<p dir="auto">I don’t know of a npp internal solution but a python script may do the following</p>
<p dir="auto">register notepad callback BUFFERACTIVATED and FILECLOSED<br />
an editor callback UPDATEUI<br />
have a variable which holds the bufferid returned by BUFFERACTIVATED calback<br />
and a variable which indicates that something has changed by checking UPDATEUI</p>
<p dir="auto">High level logic:<br />
whenever the BUFFERACTIVATED callback returns save the current bufferid<br />
when UPDATEUI callback returns and is different to updated=10<br />
save the saved bufferid as the last edited document.<br />
When a FILECLOSED callback returns, check if last edited document is still there and<br />
if it is activate it.</p>
<p dir="auto">Only tested in brain - so unreliable ;-)</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/25605</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/25605</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Fri, 14 Jul 2017 13:50:32 GMT</pubDate></item></channel></rss>