From be6cd171c154c0dfffee6a60e388b8f651d39d45 Mon Sep 17 00:00:00 2001 From: Tobias Schuster Date: Tue, 25 Apr 2023 08:25:02 +0200 Subject: [PATCH] The plugin no longer closes the only open (non-pinned) tab when the user clicks on a pinned tab. Updated release workflow. --- .github/workflows/release.yml | 2 +- main.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 524bac6..1d5ce93 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,7 +28,7 @@ jobs: cp main.js manifest.json ${{ env.PLUGIN_NAME }} zip -r ${{ env.PLUGIN_NAME }}.zip ${{ env.PLUGIN_NAME }} ls - echo "::set-output name=tag_name::$(git tag --sort version:refname | tail -n 1)" + echo "tag_name=$(git tag --sort version:refname | tail -n 1)" >> $GITHUB_OUTPUT - name: Create Release id: create_release diff --git a/main.ts b/main.ts index da33e35..f73d1f8 100644 --- a/main.ts +++ b/main.ts @@ -55,6 +55,7 @@ export default class NoTabsPlugin extends Plugin { "active-leaf-change", (activeLeaf: WorkspaceLeaf) => { if (!this.data.settings.strictMode) return; + if (activeLeaf.getViewState().pinned) return; const { type } = activeLeaf.getViewState(); if (type === "empty" || type === "markdown") { // @ts-ignore