diff --git a/contrib b/contrib index c869bb0b..c620f527 160000 --- a/contrib +++ b/contrib @@ -1 +1 @@ -Subproject commit c869bb0b6884d9c791e0a73f5d844e77fe1111f1 +Subproject commit c620f527d7a021ed72e2d1bb9562e8cddcc0a2bb diff --git a/docs/ChangeLog.md b/docs/ChangeLog.md index cb989dd6..407b1243 100644 --- a/docs/ChangeLog.md +++ b/docs/ChangeLog.md @@ -65,6 +65,7 @@ - make: fix condition for the `INSDIR_LICENSE` rule (reported by Jai-JAP) `#D2260` 5a8dcb4b - edit (`ble/widget/display-shell-version`): print shell options `#D2261` 70b89e5e ed5d451b - edit: enable `BLE_PIPESTATUS` and `PIPESTATUS` in `PROMPT_COMMAND` and prompts (requested by mattmc3) `#D2276` 27888830 +- nsearch: support `action={load-{line,command},insert{,-line}}` (motivated by vaab) `#D2286` xxxxxxxx ## Changes @@ -216,6 +217,9 @@ - contrib: add `integration/fzf-menu` (motivated by pallaswept) `#D2251` ad6f58b7 `#D2259` 5b9d9ab3 - contrib/integration/fzf-completion: add `ble/widget/fzf-complete` (motivated by 3ximus) `#D2252` ad6f58b7 - contrib/colorglass: color: import themes from `Gogh-Co/Gogh` (motivated by d4rkb4sh8) `#D2274` d2eb75b5 +- contrib/integration/fzf-completion: suppress unexpected quoting by compgen in dynamic completions (reported by mcepl) `#D2284` xxxxxxxx +- contrib/integration/fzf-initialize: use `fzf --bash` when shell integration files are not found (motivated by louiss0) `#D2285` xxxxxxxx +- config: add `github499-append-to-last-modified` (motivated by vaab) `#D2286` xxxxxxxx ## Documentation diff --git a/lib/core-syntax.sh b/lib/core-syntax.sh index 65f1ffde..e3791cc5 100644 --- a/lib/core-syntax.sh +++ b/lib/core-syntax.sh @@ -6221,6 +6221,7 @@ function ble/syntax:bash/extract-command/.construct-proc { if ((wtype==CTX_CMDI||wtype==CTX_CMDX0)); then if ((EC_pos '/home/tmp1/a:b' の書き換え) によって問題が回避されている + 様である。しかし、fzf-completion は文法レベルで処理をしようとするのでこの + ble.sh の調整を無効にしている。然し、これが fzf-completion から呼び出してい + る dynamic completion にも影響を与えているという事。dynamic completion につ + いては文法に直接作用する調整は必要ない気がする。 + + fzf から呼び出される dynamic completion では ble/syntax-raw の処理を外す様 + にしたら問題は発生しなくなった。 + * canvas: Unicode 16.0.0 [#D2283] どうやら 2024-09-10 頃に Unicode 16.0.0 が公開された様である。更新する。書 diff --git a/src/color.sh b/src/color.sh index 0782ef65..d0c4fab6 100644 --- a/src/color.sh +++ b/src/color.sh @@ -2101,13 +2101,24 @@ function ble/highlight/layer:region/update { fi fi + sel=("${selection[@]}") + local nsel=$((${#sel[@]}/2)) + # gflags の決定 local face=region ble/function#try ble/highlight/layer:region/mark:"$_ble_edit_mark_active"/get-face - local ret; ble/color/face2g "$face"; local g=$ret - - sel=("${selection[@]}") - ble/array#fill-range gflags 0 "$((${#selection[@]}/2))" "$g" + face=("${face[@]::nsel}") + local f ret + for f in "${face[@]}"; do + ble/color/face2g "$f" + ble/array#push gflags "$ret" + done + if ((${#gflags[@]}=0&&beg " _ble_edit_nsearch_needle || return 1 - _ble_edit_nsearch_input=$_ble_edit_nsearch_needle + ble/builtin/read -ep "nsearch> " needle || return 1 + _ble_edit_nsearch_input=$needle elif [[ :$opts: == *:again:* ]]; then - _ble_edit_nsearch_needle=$_ble_edit_nsearch_input + needle=$_ble_edit_nsearch_input else local len=$_ble_edit_ind if [[ $_ble_decode_keymap == vi_[noxs]map ]]; then # vi_nmap の中にいる時は現在カーソルがある文字も検索文字列に含める ble-edit/content/eolp || ((len++)) fi - _ble_edit_nsearch_needle=${_ble_edit_str::len} + needle=${_ble_edit_str::len} + [[ ${_ble_edit_nsearch_loadctx[0]} ]] && + needle=${needle:_ble_edit_nsearch_loadctx[0]} fi + _ble_edit_nsearch_needle=$needle # 検索文字列が空の時は別の動作を行う if [[ ! $_ble_edit_nsearch_needle ]]; then @@ -10012,7 +10112,7 @@ function ble/widget/nsearch/cancel { if [[ $record ]]; then local line=${record#*:} ble/string#split record , "${record%%:*}" - if [[ :$_ble_edit_nsearch_opts: == *:action=load:* ]]; then + if [[ $_ble_edit_nsearch_loadctx ]]; then ble-edit/content/reset-and-check-dirty "$line" else ble-edit/history/goto "$_ble_edit_nsearch_index0"