Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gvim.exe で ConPty 使用時に :terminal から非対応の端末オプションを受信すると E254 で操作不能になる #1379

Open
Milly opened this issue Sep 18, 2021 · 0 comments

Comments

@Milly
Copy link

Milly commented Sep 18, 2021

不具合の内容

Windows の gvim.exe で set termwintype=conpty を指定し、 :terminal を操作中にターミナル内から非対応の端末オプションを受信すると E254 エラーが連続で発生して操作不能になる。

現象・ログ

E254: %p1%s の色を割り当てられません

再現手順

  1. Windows + WSL 環境を用意
  2. gvim.exe -u parent-vimrc -U NONE を実行
    parent-vimrc:
    set nocompatible
    set termwintype=conpty
    terminal ++curwin bash.exe --norc
  3. 上のターミナル内で TERM=xterm vim -u child-vimrc を実行
    child-vimrc:
    set nocompatible
    syntax keyword UC foo
    highlight UC cterm=undercurl guisp=Red
    insert
    foo
    .

期待動作

set termwintype= (GDI) の時はエラーは発生しない。
せめて完全に操作不能になるのは避けたい。

Vimのバージョン

8.2.3434 (Windows, gvim.exe) (このIssueで不具合があるとしている側)
8.2.3400 (WSL Ubuntu, vim)

OSの種類/ディストリ/バージョン

  • Windows 10 Pro 64bit 20H2 (19042.1165)
  • (WSL) Ubuntu 18.04.6 LTS

使用している or 関係していそうなプラグイン

無し

その他

  • WSL の vim で &t_Cs の値は "\e]12;%p1%s\007" となっている。(xterm の Cs)
  • child-vimrc 内で set t_Cs= を指定すれば回避できる。
  • そもそも ConPty で undercurl は非対応(?)なので、WSL において $TERM と terminfo を正しく指定できていれば vim で &t_Cs が空になって underline にフォールバックされるので発生しないはず。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants