@@ -646,14 +646,6 @@ async function EditorManager($header, $body) {
646646
647647 manager . activeFile = file ;
648648
649- if ( file . hideQuickTools ) {
650- root . classList . add ( "hide-floating-button" ) ;
651- actions ( "set-height" , { height : 0 , save : false } ) ;
652- } else {
653- root . classList . remove ( "hide-floating-button" ) ;
654- actions ( "set-height" , appSettings . value . quickTools ) ;
655- }
656-
657649 if ( file . type === "editor" ) {
658650 editor . setSession ( file . session ) ;
659651 editor . setReadOnly ( ! file . editable || ! ! file . loading ) ;
@@ -679,6 +671,15 @@ async function EditorManager($header, $body) {
679671 }
680672 }
681673
674+ if ( file ?. hideQuickTools ) {
675+ root . classList . add ( "hide-floating-button" ) ;
676+ actions ( "set-height" , { height : 0 , save : false } ) ;
677+ } else {
678+ root . classList . remove ( "hide-floating-button" ) ;
679+ const quickToolsHeight = appSettings . value . quickTools || 1 ;
680+ actions ( "set-height" , { height : quickToolsHeight , save : true } ) ;
681+ }
682+
682683 $header . text = file . filename ;
683684 manager . onupdate ( "switch-file" ) ;
684685 events . emit ( "switch-file" , file ) ;
0 commit comments