jskinner / DefaultPackages

Old bug tracker for Sublime Text's "Default Packages", e.g. bad syntax highlighting
http://web.archive.org/web/20150524043750/https://www.sublimetext.com/forum/viewtopic.php?f=2&t=12095
26 stars 2 forks source link

Read `show_panel_on_build` from view settings #105

Closed FichteFoll closed 8 years ago

FichteFoll commented 9 years ago

From @ctf0 on February 16, 2015 10:0

am trying to set "show_panel_on_build": true as a default and "show_panel_on_build": false only for JS, but it seems that this setting is global and it cant have different settings ,so could the current behavior be altered in anyway ?

Copied from original issue: SublimeTextIssues/Core#679

FichteFoll commented 9 years ago

For some apparent reason this is correct, refer to line 187 of exec.py:

show_panel_on_build = sublime.load_settings("Preferences.sublime-settings").get("show_panel_on_build", True)

The build_env setting however is later read from the view.

I suggest to instead load show_panel_on_build setting from the view settings with self.window.active_view().settings() to make the above scenario possible.

@ctf0: FWIW, you can patch exec.py manually on your machine.

ctf0 commented 9 years ago

thanx for the heasup but how do i add the self.window.active_view().settings() line ? ,am sorry but i have no knowledge about python.

FichteFoll commented 9 years ago
  1. Get PackageResourceViewer
  2. Open Default/exec.py with it
  3. Go to line 187 and replace it with

    show_panel_on_build = self.window.active_view().settings().get("show_panel_on_build", True)
  4. Save
ctf0 commented 9 years ago

nice ,this does the trick ,thanx

FichteFoll commented 8 years ago

This issue was moved back to the other repo.