Rename Window.columns to Window.saved_columns
This more accurately describes what it's for, and also avoids a conflict with the columns identifier defined by terminfo's <term.h>.
This commit is contained in:
parent
9524f8996c
commit
ac1c95c4ec
|
@ -635,7 +635,7 @@ typedef struct WindowStru
|
|||
unsigned long window_level; /* The LEVEL of the window, determines what
|
||||
* messages go to it */
|
||||
int skip;
|
||||
int columns;
|
||||
int saved_columns; /* Columns on the last screen used by this window */
|
||||
char *prompt; /* A prompt string, usually set by EXEC'd process */
|
||||
int double_status; /* number of status lines */
|
||||
int status_split; /* split status to top and bottom */
|
||||
|
|
|
@ -214,7 +214,7 @@ static LookupStruct win_struct[] = {
|
|||
{ "LINE_CNT", offsetof(Window, line_cnt), INT_TYPE_VAR , VAR_READ_ONLY },
|
||||
{ "SCROLL", offsetof(Window, noscroll), BOOL_TYPE_VAR , VAR_READ_WRITE },
|
||||
{ "SCRATCH", offsetof(Window, scratch_line), BOOL_TYPE_VAR , VAR_READ_WRITE },
|
||||
{ "COLUMNS", offsetof(Window, columns), INT_TYPE_VAR , VAR_READ_ONLY },
|
||||
{ "COLUMNS", offsetof(Window, saved_columns), INT_TYPE_VAR , VAR_READ_ONLY },
|
||||
{ "NOTIFY_LEVEL", offsetof(Window, notify_level), INT_TYPE_VAR , VAR_READ_WRITE },
|
||||
{ "WINDOW_LEVEL", offsetof(Window, window_level), INT_TYPE_VAR , VAR_READ_WRITE },
|
||||
{ "CURRENT_CHANNEL", offsetof(Window, current_channel),STR_TYPE_VAR , VAR_READ_ONLY },
|
||||
|
|
|
@ -426,9 +426,9 @@ void BX_add_to_invisible_list(Window *window)
|
|||
* wrapping output while the window is hidden.
|
||||
*/
|
||||
if (window->screen)
|
||||
window->columns = window->screen->co;
|
||||
window->saved_columns = window->screen->co;
|
||||
else
|
||||
window->columns = main_screen->co;
|
||||
window->saved_columns = main_screen->co;
|
||||
window->screen = NULL;
|
||||
}
|
||||
|
||||
|
@ -441,7 +441,7 @@ void BX_add_to_invisible_list(Window *window)
|
|||
*/
|
||||
int window_columns(Window *window)
|
||||
{
|
||||
return window->screen ? window->screen->co : window->columns;
|
||||
return window->screen ? window->screen->co : window->saved_columns;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue