Sublime Forum

Command Prompt Popup On Save

#1

I have a few plug-ins that seem to produce a command prompt to pop up when I save or run actions like previewing markdown in a browser. I’ve seen other posts acknowledging this behavior, but none that suggest global fixes or processes for specific fixes beyond uninstalling the application or disabling the “on save” or similar behavior if supported.

I’d like to know if there is a way to prevent this command prompt from popping up at a core level or at the very least a way to change it from within the package’s python code in case preventing all popups becomes too heavy handed.

Any help would be appreciated!

For reference, the primary two offending packages in my day-to-day are:

  1. Terrafmt
  2. MarkdownPreview
0 Likes

#2

I would guess that Markdown Preview is deliberately showing a window: https://github.com/facelessuser/MarkdownPreview/blob/master/markdown_preview.py#L879
It might be worth comparing with exec.py in the Default package to see how it is done correctly.

There’s unfortunately no global way to enforce no console window showing, but if you change the Python code for those misbehaving plugins to work like the standart ST build system (that’s the exec.py referenced above) you should be good to go

0 Likes

#3

Actually the marked line sets the required flag in startupinfo structure to prevent console window popping up on Windows OS. MarkdownPreview is behaving correct and that’s exactly what runners in exec.py do, too.

Terrafmt is misbehaving by not providing those information. A PR with a fix is still pending at https://github.com/p3lim/sublime-terrafmt/pull/4.

0 Likes