Simple checkbox addition to exclude pinned tabs from auto removal
package.json
+++ extensions\b9software.vsx-auto-close-tab-1.0.0\package.json
@@ -15,11 +15,11 @@
"contributes": {
"configuration": {
"properties": {
+ "B9AutoCloseTab.excludePinned": {
+ "default": false,
+ "description": "Exclude pinned tabs from the maximum tab limit count",
+ "type": "boolean"
+ },
"B9AutoCloseTab.maxTabs": {
"default": 7,
"description": "Maximum number of tabs to keep open in each editor group",
extension.json
+ exc=O().get("excludePinned",false),
+ if(exc&&a.isPinned)continue;
Within context:
updateTabActivation(t,e){let i=this.r(t,e);i&&this.t.set(i,Date.now())}async s(){for(let t of s.all)await this.u(t);this.p()}async u(t){let e=$(),exc=O().get("excludePinned",false),i=[];for(let a of t.tabs){let p=this.r(t,a);if(!p)continue;if(exc&&a.isPinned)continue;let v=this.t.get(p);v||this.t.set(p,Date.now()),i.push({lastActiveTime:v??Date.now(),tab:a,tabKey:p})}if(i.length<=e)return;
Simple checkbox addition to exclude pinned tabs from auto removal
Within context: