diff --git a/termemu.cpp b/termemu.cpp index 5da8ab4..71cd2b1 100644 --- a/termemu.cpp +++ b/termemu.cpp @@ -140,6 +140,12 @@ void emulate_terminal( int fd, int debug_fd ) return; } + /* tell child process */ + if ( ioctl( fd, TIOCSWINSZ, &window_size ) < 0 ) { + perror( "ioctl TIOCSWINSZ" ); + return; + } + /* open parser and terminal */ Parser::UTF8Parser parser; Terminal::Emulator terminal( window_size.ws_col, window_size.ws_row ); diff --git a/terminalframebuffer.cpp b/terminalframebuffer.cpp index 1ca9a90..2c8d782 100644 --- a/terminalframebuffer.cpp +++ b/terminalframebuffer.cpp @@ -186,8 +186,8 @@ Cell *Framebuffer::get_cell( int row, int col ) Cell *Framebuffer::get_combining_cell( void ) { - if ( (ds.get_combining_char_row() >= ds.get_width()) - || (ds.get_combining_char_col() >= ds.get_height()) ) { + if ( (ds.get_combining_char_col() >= ds.get_width()) + || (ds.get_combining_char_row() >= ds.get_height()) ) { return NULL; } /* can happen if a resize came in between */