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 で confirm() 関数のヘルプ例が説明通りの動作をしない #1383

Open
iranoan opened this issue Dec 27, 2021 · 0 comments
Open

Comments

@iranoan
Copy link

iranoan commented Dec 27, 2021

質問の内容

日本語ヘルプに confirm() に関して、

'&' の後の文字は選択肢のショートカットキーになる。

との記述が有りますが、GUI 版だと一部の文字列でショートカットキーが働かなくなります

例えば

$ vim -g -u NONE
$ LANGUAGE=C vim -g -u NONE

confirm-ja
confirm-C

といった方法で起動し
let n = confirm('Save changes?', "&Yes\n&No\n&Cancel")
を実行すると、次のダイアログが表示されます

しかし y, n, c がショートカットキーとして作用しません

なにか標準で読み込むファイルで文字列が置き換わっていることが原因だと思いますが、これを回避する方法はあるのでしょうか?
(&Y)es など別の文字列を使うしか無いのでしょうか

Vimのバージョン

$ vim --version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Nov 08 2021 14:17:01)
適用済パッチ: 1-2434, 3402-3403, 3409, 3428, 3487, 3564, 3581-3582
Modified by team+vim@tracker.debian.org
Compiled by team+vim@tracker.debian.org
Huge 版 with GTK3 GUI. 機能の一覧 有効(+)/無効(-)

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

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 21.10
Release: 21.10
Codename: impish
$ uname -a
Linux xxxx 5.13.0-22-generic #22-Ubuntu SMP Fri Nov 5 13:21:36 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

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

1 participant