Skip to content

Commit a34b547

Browse files
authored
Merge pull request #1294 from bajrangCoder/main
2 parents 9221237 + 7ee9820 commit a34b547

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/lib/editorManager.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)