From 2140d1ec7e60bf05d4291d655236ef3146f74860 Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Sat, 8 Jan 2022 11:26:15 +0900 Subject: [PATCH] menu (menu-style:desc): fix not working "bleopt menu_desc_multicolumn_width=" --- docs/ChangeLog.md | 1 + lib/core-complete.sh | 2 +- note.txt | 11 +++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/ChangeLog.md b/docs/ChangeLog.md index 993c75e4..2aba8b44 100644 --- a/docs/ChangeLog.md +++ b/docs/ChangeLog.md @@ -80,6 +80,7 @@ - blerc: fix the name of the option `bleopt canvas_winch_action` (reported by Knusper) b1be640 - menu (menu-style:desc): improve descriptions (motivated by Shahabaz-Bagwan) `#D1685` 4de1b45 - menu (menu-style:desc): support multicolumns (motivated by Shahabaz-Bagwan) `#D1686` 231dc39 + - menu (menu-style:desc): fix not working `bleopt menu_desc_multicolumn_width=` `#D1727` 0000000 - term: let DECSCUSR pass through terminal multiplexers (motivated by cmplstofB) `#D1697` a3349e4 - complete: requote for more compact representations on full completions `#D1700` a1859b6 - complete: improve support for `declare` and `[[ ... ]]` `#D1701` da38404 diff --git a/lib/core-complete.sh b/lib/core-complete.sh index 90c2bd04..ab71339c 100644 --- a/lib/core-complete.sh +++ b/lib/core-complete.sh @@ -388,9 +388,9 @@ function ble/complete/menu-style:desc/construct-page { ble/color/face2sgr-ansi syntax_delimiter; local desc_sgrt=$ret local ncolumn=1 nline=$lines + local nrest_item=$((${#menu_items[@]}-begin)) if [[ $bleopt_menu_desc_multicolumn_width ]]; then ncolumn=$((cols/bleopt_menu_desc_multicolumn_width)) - local nrest_item=$((${#menu_items[@]}-begin)) if ((ncolumn<1)); then ncolumn=1 elif ((ncolumn>nrest_item)); then diff --git a/note.txt b/note.txt index 9327ab85..b5228021 100644 --- a/note.txt +++ b/note.txt @@ -1675,6 +1675,11 @@ bash_tips ToDo ------------------------------------------------------------------------------- +2022-01-08 + + * mandb: echo のオプションの抽出 (help echo) がおかしい at fc35 vm + chatoyancy では問題は発生していない + 2021-12-22 * ディレクトリ固有の local commands & aliases を可能にする? @@ -5792,6 +5797,12 @@ bash_tips 2022-01-08 + * complete (menu-style:desc): fix not working "bleopt menu_desc_multicolumn_width=" [#D1727] + + menu_desc_multicolumn_width= として multicolumn を無効化しようとするとゼロ + 除算のエラーになる。定義していない変数を誤って参照して ncolumn=0 になってい + た。修正した。 + * decode: bind の古い形式が使えなくなっている (reported by returntrip) [#D1726] https://github.com/akinomyoga/ble.sh/issues/165