Skip to content

Commit

Permalink
decode: fix a bug of broken cmap cache
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Apr 13, 2020
1 parent d19a9af commit 16b56bf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions lib/init-cmap.sh
Expand Up @@ -48,6 +48,7 @@
# 2019-05-06 ble-update 関連でバグがあったのを潰したので更新。
# 2020-01-31 @ESC, @NUL を追加した。
# 2020-03-12 __line_limit__ を追加
# 2020-04-13 cmap キャッシュ生成のバグ修正に伴う更新。

function ble/init:cmap/bind-single-csi {
ble-bind -k "ESC [ $1" "$2"
Expand Down
13 changes: 9 additions & 4 deletions src/decode.sh
Expand Up @@ -2452,10 +2452,15 @@ function ble/decode/cmap/initialize {
else
ble-edit/info/immediate-show text 'ble.sh: generating "'"$dump"'"...'
source "$init"
ble-bind -D | ble/bin/sed '
s/^declare \{1,\}\(-[aAfFgilrtux]\{1,\} \{1,\}\)\{0,1\}//
s/^-- //
s/["'"'"']//g
ble-bind -D | ble/bin/awk '
{
sub(/^declare +(-[aAfFgiclrtux]+ +)?/, "");
sub(/^-- +/, "");
}
/^_ble_decode_(cmap|csimap|kbd)/ {
gsub(/["'\'']/, "");
print
}
' >| "$dump"
fi

Expand Down

0 comments on commit 16b56bf

Please sign in to comment.