commit 3cea4ff5b5f444730267c4774f4217b6079fc71a from: Omar Polo date: Wed Aug 18 16:45:49 2021 UTC simplify ncurses window setup Don't bother computing the correct initial sizes for the windows, just call rearrange_windows before the event loop. commit - 62dba32907c6d896e3c7eef100663ada45077100 commit + 3cea4ff5b5f444730267c4774f4217b6079fc71a blob - bed65fdfaaa525e0fc3697c0fed86952b81a3de3 blob + 8a486a31ba1650d21b2ddd0e4213451a1905ad34 --- ui.c +++ ui.c @@ -1025,22 +1025,19 @@ ui_init() nonl(); intrflush(stdscr, FALSE); - if ((tabline = newwin(1, COLS, 0, 0)) == NULL) - return 0; - if ((body = newwin(LINES - 3, COLS, 1, 0)) == NULL) + if ((tabline = newwin(1, 1, 0, 0)) == NULL) return 0; - if ((modeline = newwin(1, COLS, LINES-2, 0)) == NULL) + if ((body = newwin(1, 1, 0, 0)) == NULL) return 0; - if ((echoarea = newwin(1, COLS, LINES-1, 0)) == NULL) + if ((modeline = newwin(1, 1, 0, 0)) == NULL) return 0; - if ((minibuffer = newwin(1, COLS, LINES-1, 0)) == NULL) + if ((echoarea = newwin(1, 1, 0, 0)) == NULL) + return 0; + if ((minibuffer = newwin(1, 1, 0, 0)) == NULL) return 0; - if ((help = newwin(1, 1, 1, 0)) == NULL) + if ((help = newwin(1, 1, 0, 0)) == NULL) return 0; - body_lines = LINES-3; - body_cols = COLS; - wbkgd(body, body_face.body); wbkgd(echoarea, minibuffer_face.background); @@ -1070,7 +1067,7 @@ void ui_main_loop(void) { switch_to_tab(current_tab); - redraw_tab(current_tab); + rearrange_windows(); event_dispatch(); }