Home Download Buy Blog Forum Support

"show_panel_on_build" on Syntax Specific User not overriding

"show_panel_on_build" on Syntax Specific User not overriding

Postby pknb on Wed Dec 05, 2012 1:48 am

Hello,

I am trying to turn off the build panel showing on build when using markdown syntax. I am on OSX and using Marked for markdown preview and I don't want the build panel popping up with a pointless "build finished" message. I have put the following in my markdown syntax specific and multimarkdown syntax specific preferences:

Code: Select all
{
    "show_panel_on_build": false
}


But it does not work. I have tested the syntax specific preference file with other settings and they have worked, but this setting does not. I was also able to change the same "show_panel_on_build" setting in my default settings for all syntaxes and it worked, but I want only markdown to not show build results. Help would be greatly appreciated.
pknb
 
Posts: 1
Joined: Wed Dec 05, 2012 1:32 am

Re: "show_panel_on_build" on Syntax Specific User not overriding

Postby dku on Sat Mar 09, 2013 5:05 pm

Hi, I had the same issue but I fix that. The problem is in "Packages/Default/exec.py" file that is responsible for builds. It's loading just User/Defaul settings but not a syntax specific settings.

To fix that I change this (line 133):
Code: Select all
show_panel_on_build = sublime.load_settings("Preferences.sublime-settings").get("show_panel_on_build", True)

to this:
Code: Select all
show_panel_on_build = self.window.active_view().settings().get('show_panel_on_build', True)

and it's work now.

However I notice that few lines below it's actually load syntax specifics settings but just for "build_env" entry. It's also checks whether "self.window.active_view()" exists before getting that entry. That's probably mean that active_view is not available in some cases.

Could someone please explain how it is? and why it's not loading syntax specific settings on default?

Thanks
dku
 
Posts: 2
Joined: Sat Mar 09, 2013 2:03 am


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 14 guests