mirror of
https://github.com/irssi/irssi.git
synced 2026-08-09 20:00:23 +02:00
When resizing terminal smaller, destroy some split windows if they don't fit
into screen otherwise. Also, irssi doesn't crash anymore or mess up the screen even if terminal is resized to 1x1 size (not sure of 0x0, my terminal doesn't resize that small, and maybe I shouldn't bother with it anyway :) git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1855 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
113486564f
commit
69dccf4a67
3 changed files with 35 additions and 46 deletions
|
|
@ -601,8 +601,8 @@ void textbuffer_view_resize(TEXT_BUFFER_VIEW_REC *view, int width, int height)
|
|||
view->cache = textbuffer_cache_get(view->siblings, width);
|
||||
}
|
||||
|
||||
view->width = width;
|
||||
view->height = height;
|
||||
view->width = width > 10 ? width : 10;
|
||||
view->height = height > 1 ? height : 1;
|
||||
|
||||
if (view->buffer->first_line == NULL) {
|
||||
view->empty_linecount = height;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue