Fix window not resized when receive signal

This commit is contained in:
Night Kaly 2024-11-22 10:17:57 +00:00
parent 4b026c244e
commit 3c005f84f9
Signed by: night0721
SSH key fingerprint: SHA256:B/hgVwUoBpx5vdNsXl9w8XwZljA9766uk6T4ubZp5HM

3
ccc.c
View file

@ -188,7 +188,7 @@ int main(int argc, char **argv)
getcwd(cwd, PATH_MAX); getcwd(cwd, PATH_MAX);
populate_files(cwd, 0, &files); populate_files(cwd, 0, &files);
handle_sigwinch(-1); get_window_size(&rows, &cols);
if (to_open_file) { if (to_open_file) {
sel_file = arraylist_search(files, argv_cp, 1); sel_file = arraylist_search(files, argv_cp, 1);
@ -215,6 +215,7 @@ void keybinding(void)
void handle_sigwinch(int ignore) void handle_sigwinch(int ignore)
{ {
get_window_size(&rows, &cols); get_window_size(&rows, &cols);
list_files();
} }
void cleanup(void) void cleanup(void)