C-l should update window size.

Noticed this when splitting the screen in tmux.
This commit is contained in:
2025-11-27 14:00:07 -08:00
parent 9afd030b87
commit 5c2571eba7

10
main.c
View File

@@ -2393,6 +2393,8 @@ process_kcommand(int16_t c)
void
process_normal(int16_t c)
{
int cols = 0;
int rows = 0;
int reps = 0;
/* C-u handling must be the very first thing */
@@ -2449,6 +2451,12 @@ process_normal(int16_t c)
case CTRL_KEY('g'):
break;
case CTRL_KEY('l'):
if (get_winsz(&rows, &cols) == 0) {
editor.rows = rows;
editor.cols = cols;
} else {
editor_set_status("Couldn't update window size.");
}
display_refresh();
break;
case CTRL_KEY('s'):
@@ -3120,8 +3128,6 @@ main(int argc, char *argv[])
}
lineno = atoi(lnarg);
jump = 1;
fprintf(stderr, "fname: %s\nlnarg: %s\nlineno: %d\n",
fname, lnarg, lineno);
}
if (fname != NULL) {