Some resize fixes. With terminfo + /SET indent_always OFF, doubleclicking

long words (URLs mostly) that get split into two lines, selects the word
fully.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1929 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-10-28 21:17:34 +00:00 committed by cras
commit 858ed4b1ef
7 changed files with 73 additions and 52 deletions

View file

@ -160,9 +160,8 @@ void term_resize(int width, int height)
#ifdef HAVE_CURSES_RESIZETERM
if (width < 0 || height < 0) {
#endif
term_deinit_int();
term_init_int();
mainwindows_recreate();
term_deinit_int();
term_init_int();
#ifdef HAVE_CURSES_RESIZETERM
} else if (term_width != width || term_height != height) {
term_width = width;
@ -172,6 +171,16 @@ void term_resize(int width, int height)
#endif
}
void term_resize_final(int width, int height)
{
#ifdef HAVE_CURSES_RESIZETERM
if (width < 0 || height < 0)
mainwindows_recreate();
#else
mainwindows_recreate();
#endif
}
/* Returns TRUE if terminal has colors */
int term_has_colors(void)
{
@ -187,6 +196,7 @@ void term_force_colors(int set)
/* Clear screen */
void term_clear(void)
{
term_set_color(root_window, 0);
clear();
}
@ -205,6 +215,8 @@ TERM_WINDOW *term_window_create(int x, int y, int width, int height)
window->x = x; window->y = y;
window->width = width; window->height = height;
window->win = newwin(height, width, y, x);
if (window->win == NULL)
g_error("newwin() failed: %d,%d %d,%d", x, y, width, height);
idlok(window->win, 1);
return window;