Skip to content

Commit 5f325e6

Browse files
committed
Add setting to optionally scroll build output to top after build
1 parent e739be2 commit 5f325e6

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

LaTeXTools.sublime-settings

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -455,11 +455,13 @@
455455
// Build panel and phantoms settings
456456
// ------------------------------------------------------------------
457457

458-
// OPTION: "highlight_build_panel"
459-
// adds syntax highlighting to the build panel so that errors, warnings, etc.
460-
// show up in different colors; if set to false, the panel will be left as-is.
458+
// Syntax highlight build panel so that errors, warnings, etc.
459+
// show up in different colors.
461460
"highlight_build_panel": true,
462461

462+
// Scroll build output panel to top after build finished.
463+
"scroll_build_panel_to_top": false,
464+
463465
// OPTION: "hide_build_panel"
464466
// level to hide the build panel after the build is finished
465467
// Possible values are:

docs/settings.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ This section refers to setting that can be found in a platform-specific block fo
127127
## Build Panel Settings
128128

129129
* `highlight_build_panel` (`true`): if `true` the build panel will have a syntax applied to highlight any errors and warnings. Otherwise, the standard output panel configuration will be used.
130+
* `scroll_build_panel_to_top` (`false`): if `true` the build output panel is scrolled to top after build finished.
130131
* `hide_build_panel` (`"no_badboxes"`): controls whether or not to hide the build panel after a build is finished. Possible values:
131132
* `"always"`: never show the build panel at all
132133
* `"no_errors"`: only show the build panel if errors occur

latextools/make_pdf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,9 @@ def finish(self, can_switch_to_pdf):
575575
sublime.set_timeout(functools.partial(self.do_finish, can_switch_to_pdf), 0)
576576

577577
def do_finish(self, can_switch_to_pdf):
578+
if get_setting("scroll_build_panel_to_top", False, self.view) is True:
579+
self.output_view.show(0, show_surrounds=False, keep_to_left=True, animate=False)
580+
578581
if self.show_errors_inline:
579582
self.create_errs_by_file()
580583
self.update_annotations()

0 commit comments

Comments
 (0)