diff --git a/src/TEScreen.C b/src/TEScreen.C index fccc5c21..14b3c49d 100644 --- a/src/TEScreen.C +++ b/src/TEScreen.C @@ -597,9 +597,9 @@ void TEScreen::initTabStops() { if (tabstops) free(tabstops); tabstops = (bool*)malloc(columns*sizeof(bool)); -//FIXME: Arrg! The 1st tabstop has to be one longer than the other! -// i.e. the kids start counting from 0 instead of 1. -// Other programs might behave correctly. Be aware. + // Arrg! The 1st tabstop has to be one longer than the other. + // i.e. the kids start counting from 0 instead of 1. + // Other programs might behave correctly. Be aware. for (int i = 0; i < columns; i++) tabstops[i] = (i%8 == 0 && i != 0); } diff --git a/src/TEShell.C b/src/TEShell.C index 3d006396..0cd57f14 100644 --- a/src/TEShell.C +++ b/src/TEShell.C @@ -176,7 +176,7 @@ static int chownpty(int fd, int grant) */ void Shell::setSize(int lines, int columns) -{ struct winsize wsize; //FIXME: put into Shell. +{ wsize.ws_row = (unsigned short)lines; wsize.ws_col = (unsigned short)columns; if(fd < 0) return; @@ -437,6 +437,8 @@ void Shell::makeShell(const char* dev, QStrList & args, const char* term, int lo argv[0] = t; } + ioctl(0,TIOCSWINSZ,(char *)&wsize); // set screen size + // finally, pass to the new program execvp(f, argv); perror("exec failed"); diff --git a/src/main.C b/src/main.C index 52cd231c..81bb7ae3 100644 --- a/src/main.C +++ b/src/main.C @@ -887,8 +887,8 @@ void TEDemo::doneSession(TESession* s, int ) s->setConnect(FALSE); // This slot (doneSession) is activated from the Shell when receiving a - // SIGCHLD. A lot is done during the signal handler, apparently deleting - // the Shell additionally, is sometimes too much, causing something + // SIGCHLD. A lot is done during the signal handler. Apparently deleting + // the Shell additionally is sometimes too much, causing something // to get messed up in rare cases. The following causes delete not to // be called from within the signal handler.