Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/screen.c @ 167:a6ac5498d254
[/trunk] Changeset 179 by mikael
* Fix a crash when resized too small.
author | mikael |
---|---|
date | Wed, 04 May 2005 17:42:40 +0000 |
parents | faf534be8ff0 |
children | 6ad156673b19 |
comparison
equal
deleted
inserted
replaced
166:aa5b635520ef | 167:a6ac5498d254 |
---|---|
419 use_default_colors(); | 419 use_default_colors(); |
420 | 420 |
421 ParseColors(); | 421 ParseColors(); |
422 | 422 |
423 getmaxyx(stdscr, maxY, maxX); | 423 getmaxyx(stdscr, maxY, maxX); |
424 if (maxY < LOG_WIN_HEIGHT+2) | |
425 maxY = LOG_WIN_HEIGHT+2; | |
424 inputLine[0] = 0; | 426 inputLine[0] = 0; |
425 ptr_inputline = inputLine; | 427 ptr_inputline = inputLine; |
426 | 428 |
427 setlocale(LC_CTYPE, ""); | 429 setlocale(LC_CTYPE, ""); |
428 | 430 |
522 window_entry_t *search_entry; | 524 window_entry_t *search_entry; |
523 int x, y, lines, cols; | 525 int x, y, lines, cols; |
524 | 526 |
525 // First, update the global variables | 527 // First, update the global variables |
526 getmaxyx(stdscr, maxY, maxX); | 528 getmaxyx(stdscr, maxY, maxX); |
529 if (maxY < LOG_WIN_HEIGHT+2) | |
530 maxY = LOG_WIN_HEIGHT+2; | |
527 // Make sure the cursor stays inside the window | 531 // Make sure the cursor stays inside the window |
528 check_offset(0); | 532 check_offset(0); |
529 | 533 |
530 // Resize windows and update panels | 534 // Resize windows and update panels |
531 scr_DrawMainWindow(FALSE); | 535 scr_DrawMainWindow(FALSE); |