Skip to content

Commit

Permalink
fix: hack for forcing scroller movement
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jan 17, 2021
1 parent 5a9ff08 commit a5ac5ec
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,15 @@ export function toggle () {
editorsMinimaps.clear()
}
subscriptions.dispose()

// HACK: this hack forces rerendering editor size which moves the scrollbar to the right once minimap is removed
const wasMaximized = atom.isMaximized()
const { width, height } = atom.getSize()
atom.setSize(width, height)
if (wasMaximized) {
atom.maximize()
}

} else {
toggled = true
initSubscriptions()
Expand Down

0 comments on commit a5ac5ec

Please sign in to comment.