From 5d7daabe7ce8c437cfcd02e76e016efc74672635 Mon Sep 17 00:00:00 2001 From: Valentin Iovene Date: Tue, 24 Oct 2023 12:47:13 +0200 Subject: [PATCH] address geier comment --- khal/cli.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/khal/cli.py b/khal/cli.py index b723c3360..538ff9d4d 100644 --- a/khal/cli.py +++ b/khal/cli.py @@ -97,7 +97,7 @@ def mouse_option(f): o = click.option( '--mouse/--no-mouse', is_flag=True, - default=True, + default=None, help='Disable mouse in interactive UI' ) return o(f) @@ -494,7 +494,8 @@ def isatty(_file): @click.pass_context def interactive(ctx, include_calendar, exclude_calendar, mouse): '''Interactive UI. Also launchable via `ikhal`.''' - ctx.obj['conf']['default']['enable_mouse'] = mouse + if mouse is not None: + ctx.obj['conf']['default']['enable_mouse'] = mouse controllers.interactive( build_collection( ctx.obj['conf'], @@ -511,7 +512,8 @@ def interactive(ctx, include_calendar, exclude_calendar, mouse): def interactive_cli(ctx, config, include_calendar, exclude_calendar, mouse): '''Interactive UI. Also launchable via `khal interactive`.''' prepare_context(ctx, config) - ctx.obj['conf']['default']['enable_mouse'] = mouse + if mouse is not None: + ctx.obj['conf']['default']['enable_mouse'] = mouse controllers.interactive( build_collection( ctx.obj['conf'],