Skip to content

Commit

Permalink
edit (history_share): update history on "discard-line"
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Jan 21, 2022
1 parent 4782a33 commit 8dbefe0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/ChangeLog.md
Expand Up @@ -134,6 +134,7 @@
- complete (`source:command`): not quote aliases and keywords `#D1715` d6242a7
- highlight (`wtype=CTX_CMDI`): check alias names before shell expansions `#D1715` d6242a7
- util (`ble/is-alias`): fix a bug of unredirected error messages for bash-3.2 (fixup d6242a7) `#D1730` 31372cb
- edit (`history_share`): update history on `discard-line` (reported by SuperSandro2000) `#D1742` 0000000

## Fixes

Expand Down
11 changes: 10 additions & 1 deletion note.txt
Expand Up @@ -1079,7 +1079,7 @@ bash_tips
この動作に従うと history -n; history -a や
history -a; history -n を実行すると問題が生じる事になる。
書き込み済みのデータ・読み取り済みのデータが混ざった時に正しく範囲を表現できない。
この事が理由で巷にある動機の設定では history -a; history -cr を実行しているのである。
この事が理由で巷にある同期の設定では history -a; history -cr を実行しているのである。

* HISTCONTROL=erasedups
試してみたが erasedups が設定されていたとしても history -n で新しく読み取った
Expand Down Expand Up @@ -5836,6 +5836,15 @@ bash_tips
Done (実装ログ)
-------------------------------------------------------------------------------

2022-01-21

* prompt: C-c で history_share が有効でない (reported by SuperSandro2000) [#D1742]
https://github.com/akinomyoga/ble.sh/issues/96#issuecomment-1018101640

うーん。確かにそうだ。確か以前もっと高頻度で更新する事についても考察したが、
編集中に何か変な事が起こると大変だと思ってそれは棄却したのだった。然し、C-c
で discard-line する場合には安全に履歴をロードする事ができる。対応する。

2022-01-20

* prompt: cygwin で root prompt mark が正しく表示されなくなっている [#D1741]
Expand Down
1 change: 1 addition & 0 deletions src/edit.sh
Expand Up @@ -5737,6 +5737,7 @@ function ble/widget/.newline {

function ble/widget/discard-line {
ble-edit/content/clear-arg
[[ $bleopt_history_share ]] && ble/builtin/history/option:n
_ble_edit_line_disabled=1 ble/widget/.newline keep-info
ble/textarea#render
}
Expand Down

0 comments on commit 8dbefe0

Please sign in to comment.