Skip to content

Commit

Permalink
fix: remove panel visibility listener on deactivate (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech authored Dec 8, 2020
1 parent e05efa5 commit 3f826be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/minimap-find-and-replace.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ module.exports = {
const [fnrPanel] = atom.workspace.getBottomPanels().filter(panel => panel.element.firstChild.classList.contains('find-and-replace'))

if (fnrPanel) {
this.changeVisible(true)
fnrPanel.onDidChangeVisible((visible) => {
this.changeVisible(fnrPanel.isVisible())
this.subscriptions.add(fnrPanel.onDidChangeVisible((visible) => {
this.changeVisible(visible)
})
}))
} else {
if (retry < 10) {
setTimeout(() => this.setOnChangeVisibility(retry + 1), 100)
Expand Down

0 comments on commit 3f826be

Please sign in to comment.