Skip to content

Commit 522401f

Browse files
authored
Improve consistency and usability of build panel handling (#1657)
# Description This PR makes three small but related improvements around the LaTeXTools build panel: * **Expose "Show build panel" in the Command Palette** * Adds a new command palette entry: ``` makefileCopy codeLaTeXTools: Show build panel ``` * This provides a discoverable way for users to reopen the build panel manually (useful when `"hide_build_panel"` is set to `"always"` or `"never"`). * **Clarify and correct documentation of `hide_build_panel`** * The previous comments in `LaTeXTools.sublime-settings` were inconsistent: * The code fallback was `"no_warnings"`. * The defaults file set `"no_badboxes"`. * The comments claimed `"never"` was the default. * The docs are now clearer, consistent, and explicitly state the true default. * **Align code fallback with shipped defaults** * In `make_pdf.py`, the fallback for `get_setting("hide_build_panel", ...)` is updated from `"no_warnings"` → `"no_badboxes"`. * This ensures consistency between the source code and the default settings file. --- # Benefits * Users get an easy, discoverable way to open the build panel on demand. * Documentation is clearer and avoids contradictory information about defaults. * Settings behavior is more consistent between code and defaults, reducing confusion for both users and contributors.
1 parent 2e21431 commit 522401f

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

Default.sublime-commands

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@
8585
"command": "latextools_make_pdf",
8686
"args": { "hide_annotations_only": true }
8787
},
88+
{
89+
"caption": "LaTeXTools: Show build panel",
90+
"command": "show_panel",
91+
"args": { "panel": "output.latextools" }
92+
},
8893
{
8994
"caption": "Preferences: LaTeXTools Settings",
9095
"command": "edit_settings",

LaTeXTools.sublime-settings

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -466,15 +466,18 @@
466466
"scroll_build_panel_to_top": false,
467467

468468
// OPTION: "hide_build_panel"
469-
// level to hide the build panel after the build is finished
469+
// Controls when the LaTeX build panel is hidden after a build finishes.
470+
// Default: "no_warnings"
471+
//
470472
// Possible values are:
471-
// "always" (hide the panel even if the build failed),
472-
// "no_errors" (only hide the panel if the build was successful even with warnings),
473-
// "no_warnings" (only hide the panel if no warnings occur)
474-
// "no_badboxes" (only hide the panel if no badbox messages occur when badboxes are enabled) and
475-
// "never" (default, never hide the build panel)
473+
// "always" — always hide the panel, even if the build failed.
474+
// "no_errors" — hide the panel if there are no errors.
475+
// "no_warnings" — hide the panel if there are neither errors nor warnings.
476+
// "no_badboxes" — hide the panel if there are no errors, warnings, or badboxes
477+
// (when badbox reporting is enabled).
478+
// "never" — never hide the panel.
476479
"hide_build_panel": "no_badboxes",
477-
480+
478481
// OPTION: "display_bad_boxes"
479482
// controls whether or not to display any bad boxes in the build output
480483
// if this is not set to true, the setting "no_badboxes" for

latextools/make_pdf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ def run(
431431

432432
self.output_view.set_read_only(True)
433433

434-
self.hide_panel_level = get_setting("hide_build_panel", "no_warnings", view)
434+
self.hide_panel_level = get_setting("hide_build_panel", "no_badboxes", view)
435435
if self.hide_panel_level == "never":
436436
self.show_output_panel(force=True)
437437

0 commit comments

Comments
 (0)