Skip to content

Commit

Permalink
complete: fix a problem that candidates are not updated after menu-fi…
Browse files Browse the repository at this point in the history
…lter
  • Loading branch information
akinomyoga committed Dec 9, 2020
1 parent 7e16d9d commit 98fbc1c
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 4 deletions.
3 changes: 0 additions & 3 deletions lib/core-complete.sh
Expand Up @@ -4811,9 +4811,6 @@ function ble/complete/menu-filter/.filter-candidates {
done
((${#cand_pack[@]}!=0)) && return 0
done

# 最初に生成した全ての候補 (遡って書き換える候補等)
cand_pack=("${_ble_complete_menu0_pack[@]}")
}
function ble/complete/menu-filter/.get-filter-target {
if [[ $_ble_decode_keymap == emacs || $_ble_decode_keymap == vi_[ic]map ]]; then
Expand Down
3 changes: 2 additions & 1 deletion memo/ChangeLog.md
Expand Up @@ -9,7 +9,8 @@

## Fixes

- term: fix a bug that VTE based terminals are not recognized
- term: fix a bug that VTE based terminals are not recognized `#D1427` ad843b4
- complete: fix a problem that candidates are not updated after menu-filter (reported by 3ximus) `#D1428` 0000000

## Internal changes and fixes

Expand Down
38 changes: 38 additions & 0 deletions note.txt
Expand Up @@ -1197,6 +1197,17 @@ bash_tips
ToDo
-------------------------------------------------------------------------------

2020-12-09

* READLINE_MARK, etc. の値が残ってしまっている。

これは ble/textarea#adjust-for-bash-bind によって設定されている値である。
コマンドを実行する時に復元・保存する様にするのが良いのではないだろうか。

* 何故か READLINE_LINE, READLINE_POINT が export されている。
と思ったが、これは ble.sh を bind -x の内部で動かしているからであった。
READLINE_LINE 及び READLINE_POINT が

2020-11-30

* color: face editor の TUI の様な物を作っても良いのかもしれない。
Expand Down Expand Up @@ -3680,6 +3691,33 @@ bash_tips
Done (実装ログ)
-------------------------------------------------------------------------------

2020-12-09

* complete: 補完候補が更新されない問題 (reported by 3ximus) [#D1428]

これは明らかに menu-filter で候補がなくなった時に、
元の候補を全て表示する様に変更したのが原因である。
やはり一致しなくなった時点で候補は表示しない様に変更する事にした。

b 或いは別の変更方法として、候補再生成のフラグを設定して、
この時にはメニューから候補を拾う事はしない様にする?

x と思ったが、そうすると結局候補を全て表示する意味がない? 候補を表示する
のはメニューから選択させる為であるが、メニューから候補を拾わない様にし
た時点でそれが使えない?

% x と思ったが連続 TAB や、明示的な menu-complete の bind の時には、候
% 補の再生成をせずに menu に入る事が可能になる。

でも連続 TAB の場合は最初の TAB の時点で候補再生成が起こるので、表示し
ている候補が使われる事はない。明示的な menu-complete の bind についても
既定では C-TAB 等余り使われなさそうな物になっているので設計に考慮に入れ
なくて良い気がする。

此処まで処理を複雑にしても余り有用ではなさそう。次の TAB で候補一覧はすぐ
に消えてしまうので、絞り込み前の候補一覧を表示しても却って混乱を生むだけ
である。この選択肢は却下である。

2020-12-08

* util/term: lxterminal, gnome-terminal で vte の検出に失敗している [#D1427]
Expand Down

0 comments on commit 98fbc1c

Please sign in to comment.