Terminal size is not correct when 2nd tab is added in zoom/fullscreen
|Reported by:||romain||Owned by:||jackburton|
- Start a Terminal
- Zoom/expand the window
- add a second tab
- Select the first tab -> The last line at the bottom of the terminal view is no more visible.
When the terminal window is zoomed or in fullscreen mode, the window size cannot be increased to display the SmartTabView. So the TermView of the first tab is resized to a smaller size. This resize is done while the TermView is detached from the window, so its internal size is changed in BView::_ResizeBy, but the FrameResized hook is not called. When the first tab is selected later it is resized in SmartTabView::Select, but since its size was already changed internaly, this call has no effect.
Enclosed is a partial patch to fix this:
- Each time a TermView is attached to a window, SetTermSize is called to make the row/column count match the view size.
- In order to get this working at startup, the TermView size is initialized in its contructor.
However there is another issue I could not fix correctly: Somewhere when initializing the SmartTabView, the TermView is resized to very small values. In the patch, a test is added to prevent resizing the TermView to too small settings.