Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

window.find_output_panel( "console" ) returns None instead of the Console output view #2929

Closed
evandrocoan opened this issue Aug 12, 2019 · 6 comments

Comments

@evandrocoan
Copy link

Description

I would like change the font size of the console independent from the rest of the window, or from other windows, i.e., without changing the font-size globally. But when running print( window.find_output_panel('console') ), it returns None.

Currently the only way to change the console font-size is changing it globally on the user settings.

Steps to reproduce

  1. Open Sublime Text console
  2. Run the command print( window.find_output_panel( "console" ) )

Expected behavior

As window.run_command( "show_panel", { "panel": "console" } ) opens the console,
the command print( window.find_output_panel('console') ) should get the console output view too.

Actual behavior

window.run_command( "show_panel", { "panel": "console" } ) opens the console,
but the command print( window.find_output_panel( "console" ) ) does not get console
output view.

Environment

  • Operating system and version:
    • Windows 10 build 15063 x64
    • Mac OS ...
    • Resolution 1920x1080
    • dpi_scale 1.0
    • Sublime Text:
    • Build 3207
    • 64 bit
@Thom1729
Copy link

Not all panels are output panels. In particular, the console is not an output panel. window.find_output_panel('console')) should find the output panel whose panel name is output.console. There is no such output panel, so it returns None.

@wbond
Copy link
Member

wbond commented Aug 12, 2019

As @Thom1729 mentions, the API that currently exists is working properly.

In your case, it sounds like you should rephrase your bug as a feature request. That said, it may not be a simple addition on our side since I know in the past we've found that modifications to the console can easily deadlock as ST tried to write error messages to the console when the user tries to modify the console's settings.

@evandrocoan
Copy link
Author

evandrocoan commented Sep 15, 2019

In your case, it sounds like you should rephrase your bug as a feature request. That said, it may not be a simple addition on our side since I know in the past we've found that modifications to the console can easily deadlock as ST tried to write error messages to the console when the user tries to modify the console's settings.

Then, this is a feature request. I managed to change the Console font_size by editing the Widget.sublime-settings. I also added line number to it, etc. Sad it is affecting all widgets.
image

@evandrocoan
Copy link
Author

May be the console could use its a dedicated setting file. Then, instead of giving me the Console View, I would just change it's settings on the Console.sublime-settings

Looking around, I saw there is already a Console Input Widget.sublime-settings.

@FichteFoll
Copy link
Collaborator

You should probably rewrite that in a new issue (ability to query for the console's view object/to specify the console widget's setting) because this one now is totally about something else.

@evandrocoan
Copy link
Author

I split this into two new issues just referenced above here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants