Skip to content

Commit

Permalink
canvas: work around "CSI ; r" unrecognized by Kitty
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Mar 7, 2021
1 parent 4fa139a commit eca2976
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions memo/ChangeLog.md
Expand Up @@ -16,6 +16,7 @@
- canvas, edit: support `bleopt info_display` (suggested by 0neGuyDev) `#D1458` 69228fa
- canvas (panel): always call `panel::render` to update height `#D1472` 51d2c05
- util (visible-bell): work around coordinate mismatches in subshells `#D1495` 01cfb10
- canvas: work around Kitty's quirk not recognizing <kbd>DECSTBM</kbd> (<kbd>CSI ; r</kbd>) `#D1503` 0000000
- prompt: support `bleopt prompt_status_{line,align}` and `face prompt_status_line` `#D1462` cca1cbc
- prompt: fix missing height allocation for status line `#D1487` b424fa5
- prompt: support `bleopt prompt_status_align=justify` `#D1494` c30a0db
Expand Down
16 changes: 16 additions & 0 deletions note.txt
Expand Up @@ -4003,6 +4003,22 @@ bash_tips
Done (実装ログ)
-------------------------------------------------------------------------------

2021-03-07

* canvas: Kitty が CSI ; r に対して何もしない (reported by timjrd) [#D1503]
https://github.com/akinomyoga/ble.sh/pull/65#issuecomment-791932281

抑 CSI ; r にしていたのは DECSLRM CSI ; s に合わせる為であり、DECSLRM を
CSI ; s にしていたのは、SCOSC と区別する為に引数の数に基づく heuristics を
用いている為である。CSI r 自体については SUNSCRL と conflict が存在している
が、SUNSCRL を実装している端末は Solaris console ぐらいしかないだろう。なの
で、CSI r をそのまま出力しても問題ないと判断する。

然し、引数の省略をすると動作しないというのは Kitty のバグなのではないのか。
まあ Kitty の全体的なデザイン等について知らないので、もしかすると Kitty は
全体的にそういう感じなのかもしれない。何れにしても Kitty の端末エミュレーショ
ンは元より滅茶苦茶なので気にしても仕方がない。

2021-03-03

* 2021-02-28 canvas/trace: align=right,center に対応する [#D1502]
Expand Down
2 changes: 1 addition & 1 deletion src/canvas.sh
Expand Up @@ -2557,7 +2557,7 @@ function ble/canvas/panel/increase-total-height.draw {
ble/canvas/put-ind.draw $((top_height-1+delta-_ble_canvas_y))
((_ble_canvas_y=top_height-1+delta))
ble/canvas/excursion-start.draw
ble/canvas/put.draw $'\e[;r'
ble/canvas/put.draw $'\e[r' # Note: Kitty は CSI ; r を認識しない
ble/canvas/excursion-end.draw
return 0
else
Expand Down

0 comments on commit eca2976

Please sign in to comment.