Menu

Resizing

2002-12-05
2002-12-06
  • Timothy Miller

    Timothy Miller - 2002-12-05

    The reason I had originally used a static array for the terminal was so that one could resize the terminal without clearing it.  I think.  It's been a while.

    Would it be good to allocate the new buffer, copy the old contents (pad it properly if enlarging), and then free the old one?

    It might also be nice to be able to shrink the terminal then grow it again and get back what was off-screen.  Of course, this would only be valid if no changes had occurred on the screen; if there were, we'd want to clear it anyhow.

     
    • Jörg Sonnenberger

      I think the copy idea a better approach then the static array. That was the line in the code I was most curious about ;-)
      I don't think it's useful the save the off-screen part if shrinking the terminal. It should be the responsibility of the application to handle that.

       

Log in to post a comment.