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:
Kevin Easton
2018-12-10 23:46:24 +11:00
parent 9524f8996c
commit ac1c95c4ec
3 changed files with 5 additions and 5 deletions

View File

@@ -635,7 +635,7 @@ typedef struct WindowStru
unsigned long window_level; /* The LEVEL of the window, determines what unsigned long window_level; /* The LEVEL of the window, determines what
* messages go to it */ * messages go to it */
int skip; 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 */ char *prompt; /* A prompt string, usually set by EXEC'd process */
int double_status; /* number of status lines */ int double_status; /* number of status lines */
int status_split; /* split status to top and bottom */ int status_split; /* split status to top and bottom */

View File

@@ -214,7 +214,7 @@ static LookupStruct win_struct[] = {
{ "LINE_CNT", offsetof(Window, line_cnt), INT_TYPE_VAR , VAR_READ_ONLY }, { "LINE_CNT", offsetof(Window, line_cnt), INT_TYPE_VAR , VAR_READ_ONLY },
{ "SCROLL", offsetof(Window, noscroll), BOOL_TYPE_VAR , VAR_READ_WRITE }, { "SCROLL", offsetof(Window, noscroll), BOOL_TYPE_VAR , VAR_READ_WRITE },
{ "SCRATCH", offsetof(Window, scratch_line), 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 }, { "NOTIFY_LEVEL", offsetof(Window, notify_level), INT_TYPE_VAR , VAR_READ_WRITE },
{ "WINDOW_LEVEL", offsetof(Window, window_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 }, { "CURRENT_CHANNEL", offsetof(Window, current_channel),STR_TYPE_VAR , VAR_READ_ONLY },

View File

@@ -426,9 +426,9 @@ void BX_add_to_invisible_list(Window *window)
* wrapping output while the window is hidden. * wrapping output while the window is hidden.
*/ */
if (window->screen) if (window->screen)
window->columns = window->screen->co; window->saved_columns = window->screen->co;
else else
window->columns = main_screen->co; window->saved_columns = main_screen->co;
window->screen = NULL; window->screen = NULL;
} }
@@ -441,7 +441,7 @@ void BX_add_to_invisible_list(Window *window)
*/ */
int window_columns(Window *window) int window_columns(Window *window)
{ {
return window->screen ? window->screen->co : window->columns; return window->screen ? window->screen->co : window->saved_columns;
} }
/* /*