From fee7902e75cde025b486d4fe46677b0d09b24498 Mon Sep 17 00:00:00 2001 From: jbara Date: Wed, 31 Jul 2024 23:41:43 +0100 Subject: [PATCH] fix: remove default item_width This commit edits gum_chooser so that item_width is only passed when a value is provided. Removing default item_width seems to fix `[ ]` and the actual entry being in separate lines. --- mdt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mdt b/mdt index dea4211..70c188d 100755 --- a/mdt +++ b/mdt @@ -12,7 +12,6 @@ todo_filename="${MDT_NEW_FILE_NAMES}" color="${MDT_MAIN_COLOR:-5}" prompt="${MDT_PROMPT:-◆}" cursor="${MDT_CURSOR:-➔}" -item_width="${MDT_ITEM_WIDTH:-75}" input_width="${MDT_INPUT_WIDTH:-65}" file_editor="${MDT_EDITOR:-${EDITOR}}" checkbox_prefix="${MDT_CHECKBOX_PREFIX:--}" @@ -96,7 +95,7 @@ die() { } gum_choose() { - gum choose --item.width="${item_width}" \ + gum choose ${item_width:+--item.width=${item_width}} \ --selected.foreground="${color}" \ --cursor.foreground="${color}" \ --cursor="${cursor} " "$@"