Skip to content

Commit

Permalink
prompt: fix a bug that rprompt is not cleared when "bleopt prompt_rps…
Browse files Browse the repository at this point in the history
…1" is reset
  • Loading branch information
akinomyoga committed Aug 22, 2020
1 parent 0fa8739 commit 1904b1d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion memo/ChangeLog.md
Expand Up @@ -32,7 +32,9 @@
- edit: support `bind 'set show-mode-in-prompt'` `#D1365` 76be6f1
- prompt: fix a bug that mode string is not shown in `auto_complete` and other sub-modes (reported by tigger04) `#D1371` f6fc7ff
- prompt: redraw prompts on the prompt content change (reported by tigger04) `#D1371` 1954a1e
- prompt: support `bleopt prompt_{{ps1,rps1}{_final,_transient}}` (suggested by Dave-Elec) `#D1366` 06381c9 `#D1374` 0000000
- prompt: support `bleopt prompt_{{ps1,rps1}{_final,_transient}}` (suggested by Dave-Elec) `#D1366` 06381c9
- prompt: fix a bug that prompt are always re-insntiated for every rendering `#D1374` 0000000
- prompt: fix a bug that rprompt is not cleared when `bleopt prompt_rps1` is reset `#D1377` 0000000
- edit: support Bash 5.1 widgets `#D1368` e747ee3
- color: support `TERM=*-direct` `#D1369` 0d38897 `#D1370` f7dc477
- complete: support `bleopt complete_auto_menu` `#D1373` 0000000
Expand Down
5 changes: 5 additions & 0 deletions note.txt
Expand Up @@ -3315,6 +3315,11 @@ bash_tips

2020-08-22

* prompt: bleopt prompt_rps1= を clear しても内容が残り続けて表示が乱れる [#D1377]
prompt_rps1 に別の有限の大きさの文字列を指定した時には問題は起こらない。
これは prompt_rps1= の時に rprompt の情報が全く更新されないのが問題だった。
クリアすらされなくなってしまう。修正した。

* contrib: prompt-git で適当にキャッシュを行うようにしたい [#D1376]
ble.sh の側からは cache の更新を管理するために、
_ble_prompt_update という変数を提供する事にした。
Expand Down
5 changes: 5 additions & 0 deletions src/edit.sh
Expand Up @@ -832,6 +832,11 @@ function ble/prompt/update {
_ble_edit_rprompt_dirty=1
_ble_edit_rprompt=("$version" "$x" "$y" "$g" "$lc" "$lg" "$esc" "$trace_hash")
_ble_edit_rprompt_bbox=("$x1" "$y1" "$x2" "$y2")
elif [[ $_ble_edit_rprompt ]]; then
# 新しい rps1 が空の場合、前回の rps1 が残っていればクリア
_ble_edit_rprompt_dirty=1
_ble_edit_rprompt_bbox=()
_ble_edit_rprompt=()
fi
}
function ble/prompt/clear {
Expand Down

0 comments on commit 1904b1d

Please sign in to comment.