From ac1c95c4ec068d6480c42763beaab9188c5bf5bb Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Mon, 10 Dec 2018 23:46:24 +1100 Subject: [PATCH] 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 . --- include/struct.h | 2 +- source/struct.c | 2 +- source/window.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/struct.h b/include/struct.h index f900a2f..3531e4b 100644 --- a/include/struct.h +++ b/include/struct.h @@ -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 */ diff --git a/source/struct.c b/source/struct.c index 31d6c85..5b436f6 100644 --- a/source/struct.c +++ b/source/struct.c @@ -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 }, diff --git a/source/window.c b/source/window.c index 2cec2ed..7a4622d 100644 --- a/source/window.c +++ b/source/window.c @@ -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; } /*