From 43d12ec042078666de314a82a9c3361f68261cce Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 4 Nov 2018 03:17:29 +0100 Subject: Mappings: Print parse error messages when running with `-r` Otherwise, the error messages only get printed in the daemon process' output. Much more convenient to print the error messages directly after running the command with `--reload-mappings`. --- DomeKey/Mappings.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/DomeKey/Mappings.m b/DomeKey/Mappings.m index f130ba6..382dbba 100644 --- a/DomeKey/Mappings.m +++ b/DomeKey/Mappings.m @@ -77,6 +77,13 @@ void reload_mappings( // Notification failed NSLog(@"Reload notification failed"); } + else { + // Run `dome_key_state_load_map_group()` to print any error messages + // from parsing. + State *tmp = dome_key_state_new(); + dome_key_state_load_map_group(tmp); + dome_key_state_free(tmp); + } return status; } -- cgit v1.2.3