File src/opt_handlers.c changed (mode: 100644) (index 2ab098a75..e6c0272b3) |
... |
... |
columns_handler(OPT_OP op, optval_t val) |
616 |
616 |
/* Handle case when 'columns' value wasn't yet initialized. */ |
/* Handle case when 'columns' value wasn't yet initialized. */ |
617 |
617 |
if(val.int_val == INT_MIN) |
if(val.int_val == INT_MIN) |
618 |
618 |
{ |
{ |
619 |
|
val.int_val = getmaxx(stdscr); |
|
|
619 |
|
val.int_val = curr_stats.initial_columns; |
|
620 |
|
if(val.int_val == INT_MIN) |
|
621 |
|
{ |
|
622 |
|
val.int_val = getmaxx(stdscr); |
|
623 |
|
} |
620 |
624 |
} |
} |
621 |
625 |
|
|
622 |
626 |
if(val.int_val < MIN_TERM_WIDTH) |
if(val.int_val < MIN_TERM_WIDTH) |
|
... |
... |
lines_handler(OPT_OP op, optval_t val) |
781 |
785 |
/* Handle case when 'lines' value wasn't yet initialized. */ |
/* Handle case when 'lines' value wasn't yet initialized. */ |
782 |
786 |
if(val.int_val == INT_MIN) |
if(val.int_val == INT_MIN) |
783 |
787 |
{ |
{ |
784 |
|
val.int_val = getmaxy(stdscr); |
|
|
788 |
|
val.int_val = curr_stats.initial_lines; |
|
789 |
|
if(val.int_val == INT_MIN) |
|
790 |
|
{ |
|
791 |
|
val.int_val = getmaxy(stdscr); |
|
792 |
|
} |
785 |
793 |
} |
} |
786 |
794 |
|
|
787 |
795 |
if(val.int_val < MIN_TERM_HEIGHT) |
if(val.int_val < MIN_TERM_HEIGHT) |
File src/status.c changed (mode: 100644) (index 473d6be53..b098f1796) |
25 |
25 |
#endif |
#endif |
26 |
26 |
|
|
27 |
27 |
#include <assert.h> /* assert() */ |
#include <assert.h> /* assert() */ |
28 |
|
#include <limits.h> |
|
|
28 |
|
#include <limits.h> /* INT_MIN */ |
29 |
29 |
#include <string.h> |
#include <string.h> |
30 |
30 |
|
|
31 |
31 |
#include "cfg/config.h" |
#include "cfg/config.h" |
|
... |
... |
load_def_values(status_t *stats) |
113 |
113 |
stats->env_type = ENVTYPE_EMULATOR; |
stats->env_type = ENVTYPE_EMULATOR; |
114 |
114 |
|
|
115 |
115 |
stats->using_screen = 0; |
stats->using_screen = 0; |
|
116 |
|
|
|
117 |
|
stats->initial_lines = INT_MIN; |
|
118 |
|
stats->initial_columns = INT_MIN; |
116 |
119 |
} |
} |
117 |
120 |
|
|
118 |
121 |
static void |
static void |
File src/status.h changed (mode: 100644) (index 28937ed76..1a8ebd913) |
... |
... |
typedef struct |
119 |
119 |
/* Stores last command-line mode command that was executed or an empty line |
/* Stores last command-line mode command that was executed or an empty line |
120 |
120 |
* (e.g. right after startup or :restart command). */ |
* (e.g. right after startup or :restart command). */ |
121 |
121 |
char *last_cmdline_command; |
char *last_cmdline_command; |
|
122 |
|
|
|
123 |
|
int initial_lines; /* Initial terminal height in lines. */ |
|
124 |
|
int initial_columns; /* Initial terminal width in characters. */ |
122 |
125 |
} |
} |
123 |
126 |
status_t; |
status_t; |
124 |
127 |
|
|
File src/ui.c changed (mode: 100644) (index 2f1ea715b..7611a87e7) |
... |
... |
resize_all(void) |
1097 |
1097 |
getmaxyx(stdscr, screen_y, screen_x); |
getmaxyx(stdscr, screen_y, screen_x); |
1098 |
1098 |
cfg.lines = screen_y; |
cfg.lines = screen_y; |
1099 |
1099 |
cfg.columns = screen_x; |
cfg.columns = screen_x; |
|
1100 |
|
|
|
1101 |
|
if(curr_stats.initial_lines == INT_MIN) |
|
1102 |
|
{ |
|
1103 |
|
curr_stats.initial_lines = screen_y; |
|
1104 |
|
curr_stats.initial_columns = screen_x; |
|
1105 |
|
} |
|
1106 |
|
|
1100 |
1107 |
load_geometry(); |
load_geometry(); |
1101 |
1108 |
|
|
1102 |
1109 |
LOG_INFO_MSG("screen_y = %d; screen_x = %d", screen_y, screen_x); |
LOG_INFO_MSG("screen_y = %d; screen_x = %d", screen_y, screen_x); |