diary

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

commit e5c0ffd66f8a30a57ee7ca95802e807023cd4454
parent 45537ba12ef60bd42ca2bd7bf4a7311a048190da
Author: Andreas Gruhler <agruhl@gmx.ch>
Date:   Sun,  2 Jan 2022 00:59:43 +0100

fix(no_mouse): restore after edit cmd

Diffstat:
Msrc/diary.c | 14++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/diary.c b/src/diary.c @@ -797,10 +797,20 @@ int main(int argc, char** argv) { fprintf(stderr, "Error retrieving edit command"); break; } + curs_set(1); - mousemask(oldmask, NULL); + + if (!CONFIG.no_mouse) { + // listen for mouse events if not disabled explicitly + mousemask(oldmask, NULL); + } + system(ecmd); - mousemask(ALL_MOUSE_EVENTS, &oldmask); + + if (!CONFIG.no_mouse) { + mousemask(ALL_MOUSE_EVENTS, &oldmask); + } + curs_set(0); keypad(cal, TRUE);