Skip to content

Commit

Permalink
term: work around leaked "DA2R" in screen from outside terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Feb 22, 2021
1 parent 5dce0b8 commit e130619
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
9 changes: 5 additions & 4 deletions memo/ChangeLog.md
Expand Up @@ -54,13 +54,14 @@
- bind: work around broken `cmd_xmap` after switching the editing mode `#D1478` 8d354c1
- edit: clear graphic rendition on newlines and external commands `#D1479` 18bb2d5
- mandb: improve extraction and cache for each locale `#D1480` 3588158
- decode (rlfunc): work around incomplete bytes in keyseq (reported by onelittlehope) `#D1483` 3559658 beb0383 0000000
- decode (rlfunc): work around incomplete bytes in keyseq (reported by onelittlehope) `#D1483` 3559658 beb0383 37363be

## Compatibility

- term: work around quirks of Solaris xpg4 awk `#D1481` 0000000
- term: support key sequences and control sequences of Solaris console `#D1481` 0000000
- term: work around Cygwin-console bug of bottom `IL`/`DL` `#D1482` 000000
- term: work around quirks of Solaris xpg4 awk `#D1481` 6ca0b8c
- term: support key sequences and control sequences of Solaris console `#D1481` 6ca0b8c
- term: work around Cygwin-console bug of bottom `IL`/`DL` `#D1482` 5dce0b8
- term: work around leaked <kbd>DA2R</kbd> in screen from outside terminal `#D1485` 0000000

## Internal changes and fixes

Expand Down
9 changes: 9 additions & 0 deletions note.txt
Expand Up @@ -3740,6 +3740,15 @@ bash_tips
Done (実装ログ)
-------------------------------------------------------------------------------

2021-02-22

* term: screen で attach した時に時々 _ble_term_* が壊れる現象 [#D1485]

screen で attach すると何故か色々壊れる現象があったが、どうも contra からの
DA2R がそのまま screen の内部の shell に伝播しているという事の気がする。
DA2R を受信した時に最初に受信した時の値を保持する様にするべきではないか。
もしくは一旦受信したら blehook で削除しておく。

2021-02-21

* decode (rlfunc): vi-replace in imap, vi-editing-mode in nmap (reported by onelittlehope) [#D1484]
Expand Down
10 changes: 8 additions & 2 deletions src/util.sh
Expand Up @@ -4091,6 +4091,7 @@ function ble/term:cygwin/initialize.hook {
}

function ble/term/DA2R.hook {
blehook DA2R-=ble/term/DA2R.hook
case $_ble_term_TERM in
(contra)
_ble_term_cuu=$'\e[%dk'
Expand Down Expand Up @@ -4579,8 +4580,13 @@ _ble_term_DA1R=
_ble_term_DA2R=
function ble/term/DA1/notify { _ble_term_DA1R=$1; blehook/invoke DA1R; }
function ble/term/DA2/notify {
_ble_term_DA2R=$1
ble/term/DA2/initialize-term
# Note #D1485: screen で attach した時に外側の端末の DA2R が混入する
# 事がある。2回目以降に受信した内容は ble.sh の内部では使用しない事
# にする。
if [[ ! $_ble_term_DA2R ]]; then
_ble_term_DA2R=$1
ble/term/DA2/initialize-term
fi
blehook/invoke DA2R
}

Expand Down

0 comments on commit e130619

Please sign in to comment.