Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Don't infinitely loop on pinned tabs #22

Merged
merged 2 commits into from Jul 25, 2023
Merged

Conversation

bb010g
Copy link
Contributor

@bb010g bb010g commented Jul 13, 2023

Fixes #21.

src/main.ts Outdated
@@ -41,8 +41,8 @@ export default class CursorLocation extends Plugin {
}

private updateShowStatus() {
const mode: string = this.app.workspace.getLeaf().getViewState()
.state?.mode;
const mode: string = this.app.workspace.getActiveViewOfType(obsidian.WorkspaceLeaf)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @bb010g, did you mean to use this.app.workspace.getActiveViewOfType(View) here, like you mentioned in #21 (comment)? That fixes the problem for me

this.app.workspace.getActiveViewOfType(obsidian.WorkspaceLeaf) does not compile

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay. You're correct; I transferred this from my live edits in .obsidian wrong. Thanks for catching it.

@spslater spslater merged commit aa4ffc1 into spslater:master Jul 25, 2023
@bb010g bb010g deleted the patch-1 branch July 26, 2023 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Freeze on tab close/switch
3 participants