Skip to content

Commit a5ac5ec

Browse files
committed
fix: hack for forcing scroller movement
1 parent 5a9ff08 commit a5ac5ec

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/main.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,15 @@ export function toggle () {
158158
editorsMinimaps.clear()
159159
}
160160
subscriptions.dispose()
161+
162+
// HACK: this hack forces rerendering editor size which moves the scrollbar to the right once minimap is removed
163+
const wasMaximized = atom.isMaximized()
164+
const { width, height } = atom.getSize()
165+
atom.setSize(width, height)
166+
if (wasMaximized) {
167+
atom.maximize()
168+
}
169+
161170
} else {
162171
toggled = true
163172
initSubscriptions()

0 commit comments

Comments
 (0)