console_server resize event stuck at 1x1
Got this working on XP, but not on Windows 7.
- Run server
- Open SublimePTY
Can't type anything into the console-buffer.
Strage. I'm developing this on win7 x64 with 32bit python 2.7 on the console_server side. Any tracebacks in Sublime?
Python 2.6.5 here.
This is what happens:
- Run server
- Server starts normally
- Open sublime
- Open SublimePTY
- Screen loads ok, but cursor is one line lower (Vintage on) than it should be
- Wait a few seconds without doing anything
- Server console (which has been visible all the time) resizes to 1X1 or something like that
- You can issue commands, but you get one character per line:
d i r V o l u m e ...
- If I now resize the console window manually, everything works more or less fine.
I meant the input at the client as well as the output from the server is 1 char per line.
I'll try to take a look tomorrow. I had to push a hotfix for SublimeREPL and now I'm tired ;-)
Question: does the console_server.py get back to the normal size or is it stuck at 1x1?
It did get stuck every time I tried, until I resized the window by hand.
Try to increase this delay to something longer (0.5s-1s) and see if changes anything. https://github.com/wuub/SublimePTY/blob/master/console/console_server.py#L52
Some updates:
-
Increasing the delay as suggested does not seem to help at all.
-
The problem seems to only occur on the primary display (?) I have two monitors (extend "mode"). The primary display is my laptop's, the second(ary) is a desktop monitor.
If, after starting the console server, I place the server's window on the primary monitor, at some point the redrawing/resizing of said window will fail and it will be stuck at 1X1 char lines. Placing the server's console on the secondary device doesn't cause this problem, although it's quite easy to see that the window is redrawing/resizing itself every so often.
I think I know what's happening. Windows is not allowing console to resize to the desired width, it can happen when font size is rather large when compared to the available resolution. This might by the reason why you cannot reproduce this on the secondary (I assume 1080p) monitor.
There is a MaximumWindowSize COORD available in CONSOLE_SCREEN_BUFFER_INFO http://msdn.microsoft.com/en-us/library/ms682093(v=vs.85) that we should probably consult before trying to set window size. Also changing the font to something much smaller on startup: http://msdn.microsoft.com/en-us/library/ms686200(v=vs.85) will allow people with lower resolutions to use whole width of sublime buffer.