diff options
author | Sheogorath | 2018-06-23 21:19:44 +0200 |
---|---|---|
committer | Sheogorath | 2018-06-23 21:19:44 +0200 |
commit | 49db5bc6534bccaea89192d95a6a0e87d0cb28dd (patch) | |
tree | 78c9bfca3a4513a4c4223c536219b6fa781dd637 /public/js/index.js | |
parent | 7542968dc7f1f0e302f3f5cdad602aab68076c38 (diff) | |
parent | f65d96c57b02c98616ffe3d8d7cc93f3e3942897 (diff) |
Merge branch 'pr-846'
Diffstat (limited to 'public/js/index.js')
-rw-r--r-- | public/js/index.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/public/js/index.js b/public/js/index.js index c6a4f770..6e13fe9c 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -566,7 +566,10 @@ var previousFocusOnEditor = null function checkEditorStyle () { var desireHeight = editorInstance.statusBar ? (ui.area.edit.height() - editorInstance.statusBar.outerHeight()) : ui.area.edit.height() - // set editor height and min height based on scrollbar style and mode + if (editorInstance.toolBar) { + desireHeight = desireHeight - editorInstance.toolBar.outerHeight() + } + // set editor height and min height based on scrollbar style and mode var scrollbarStyle = editor.getOption('scrollbarStyle') if (scrollbarStyle === 'overlay' || appState.currentMode === modeType.both) { ui.area.codemirrorScroll.css('height', desireHeight + 'px') @@ -804,6 +807,10 @@ function changeMode (type) { editorInstance.addStatusBar() editorInstance.updateStatusBar() } + // add and update tool bar + if (!editorInstance.toolBar) { + editorInstance.addToolBar() + } // work around foldGutter might not init properly editor.setOption('foldGutter', false) editor.setOption('foldGutter', true) |