luke.b//blog

< back to logs after before

I’ve now re-written a new implementation for the terminal buffer in nomad but I’ve realised that despite the integration tests passing, the terminal still doesn’t survive being resized drastically.

I’ve realised that I should definitely write some integration tests that make sure that the terminal can be resized whilst maintaining a buffer in the viewport that is vaguely what the running program would expect it to be.

When a resize occurs:

  • the cursor should be in the same position
  • the part of the bottom part of the buffer shown in the viewport should be the same (as if the buffer were “pinned” to the bottom of the viewport)
  • the part of the buffer that was in the viewport before but has now been pushed off the top of the viewport should still exist in memory and after an increase in viewport height should now be visible

I’m not sure whether all of this functionality should be included as part of the buffer or should be considered separate. I will continue to consider it separate until it is clear that it would be beneficial to make it a function of the buffer itself. This could be for the benefit of easy testing.

Anyway. Cool. Progress.