Added calculation for visible rows/columns

I needed these values to set the correct PTYsize on the shell when the view changed.