diff --git a/session.c b/session.c index c884818..926e68f 100644 --- a/session.c +++ b/session.c @@ -610,8 +610,14 @@ do_exec_no_pty(Session *s, const char *command) //FreeConsole(); //AllocConsole(); MakeNewConsole(); + prot_scr_width = s->col; + prot_scr_height = s->row; + extern HANDLE hConsole ; + hConsole = GetStdHandle (STD_OUTPUT_HANDLE); + ConSetScreenSize( s->col, s->row ); + s->ptyfd = hConsole ; // the pty is the Windows console output handle in our Win32 port - wfdtocmd = GetStdHandle (STD_INPUT_HANDLE) ; + wfdtocmd = GetStdHandle (STD_INPUT_HANDLE) ; // we use this console handle to feed input to Windows shell cmd.exe sockin[1] = allocate_sfd((int)wfdtocmd); // put the std input handle in our global general handle table //if (sockin[1] >= 0) // sfd_set_to_console(sockin[1]); // mark it as Console type diff --git a/sshpty.c b/sshpty.c index 2fba470..8f8b5d6 100644 --- a/sshpty.c +++ b/sshpty.c @@ -211,6 +211,10 @@ pty_change_window_size(int ptyfd, u_int row, u_int col, w.ws_xpixel = xpixel; w.ws_ypixel = ypixel; (void) ioctl(ptyfd, TIOCSWINSZ, &w); +#else + extern HANDLE hConsole ; + hConsole = ptyfd; + ConSetScreenSize( col, row ); #endif }