diary

Text-based journaling program
git clone https://git.in0rdr.ch/diary.git
Log | Files | Refs | README | LICENSE

commit 5e7f3a0167e6ef5214df2b19c45334dd7c22feae
parent 6e1e64520c77870542bc970504aa4e0457655487
Author: in0rdr <andreas.gruhler@uzh.ch>
Date:   Tue, 22 Nov 2016 11:34:43 +0800

Replace prev pad with window

Diffstat:
Mdiary.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/diary.c b/diary.c @@ -92,7 +92,7 @@ bool is_leap(int year) { void read_diary(char* dir) { int width = COLS - ASIDE_WIDTH - CAL_WIDTH; - WINDOW* prev = newpad(LINES - 1, width); + WINDOW* prev = newwin(LINES - 1, width, 0, ASIDE_WIDTH + CAL_WIDTH); wclear(prev); char buff[width]; @@ -107,7 +107,7 @@ void read_diary(char* dir) { } fclose(fp); } - prefresh(prev, 0, 0, 1, CAL_WIDTH + ASIDE_WIDTH, LINES, COLS); + wrefresh(prev); } bool go_to(WINDOW* calendar, WINDOW* month_sidebar, time_t date, int* cur_pad_pos) {