1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Topic bar doesn't get erased anymore after resize.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@582 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-08-10 20:50:06 +00:00 committed by cras
parent 4145834a4f
commit 3a2cc3b937
4 changed files with 7 additions and 3 deletions

View File

@ -65,7 +65,7 @@ static void sig_winch(int p)
/* Resize curses terminal */
ychange = ws.ws_row-LINES;
xchange = ws.ws_col-COLS;
#ifdef xHAVE_CURSES_RESIZETERM
#ifdef HAVE_CURSES_RESIZETERM
resizeterm(ws.ws_row, ws.ws_col);
#else
deinit_screen();

View File

@ -719,6 +719,7 @@ static void topicbar_create(void)
topic_bar = statusbar_create(STATUSBAR_POS_UP, 0);
topic_item = statusbar_item_create(topic_bar, 0, FALSE, statusbar_topic);
topic_item->max_size = TRUE;
statusbar_redraw(topic_bar);
signal_add("window changed", (SIGNAL_FUNC) sig_statusbar_topic_redraw);

View File

@ -56,8 +56,11 @@ static void statusbar_redraw_line(STATUSBAR_REC *bar)
for (tmp = bar->items; tmp != NULL; tmp = tmp->next) {
SBAR_ITEM_REC *rec = tmp->data;
if (!rec->right_justify && xpos+rec->size < COLS) {
if (!rec->right_justify &&
(rec->max_size || xpos+rec->size < COLS)) {
rec->xpos = xpos;
if (rec->max_size)
rec->size = COLS-1-xpos;
func = (STATUSBAR_FUNC) rec->func;
func(rec, bar->ypos);

View File

@ -19,7 +19,7 @@ typedef struct {
STATUSBAR_REC *bar;
int xpos, size;
int right_justify;
int right_justify, max_size;
void *func;
} SBAR_ITEM_REC;