Skip to content

Commit b8c6847

Browse files
authored
Merge pull request #1964 from h-east/update-terminal
Update terminal.{txt,jax}
2 parents 012151f + a9069b9 commit b8c6847

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

doc/terminal.jax

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*terminal.txt* For Vim バージョン 9.1. Last change: 2025 Feb 13
1+
*terminal.txt* For Vim バージョン 9.1. Last change: 2025 Feb 22
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -1075,11 +1075,12 @@ Vim からジョブへ: term_sendkeys() ~
10751075
JSONでの例: >
10761076
["drop", "path/file.txt", {"ff": "dos"}]
10771077
1078-
Vimにこのエスケープシーケンスを送信させるトリック: >
1079-
exe "set t_ts=\<Esc>]51; t_fs=\x07"
1080-
let &titlestring = '["call","Tapi_TryThis",["hello",123]]'
1081-
redraw
1082-
set t_ts& t_fs&
1078+
|echoraw()| を使用すると、Vim にこのエスケープシーケンスを送信させることができ
1079+
る: >
1080+
call echoraw("\<ESC>]51;[\"call\", \"Tapi_TryThis\", [\"hello\", 123]]\x07")
1081+
call echoraw("\<Esc>]51;[\"drop\", \"README.md\"]\x07")
1082+
Note: JSON では文字列値をダブルクォートで囲む必要があるため、エスケープする必
1083+
要がある。
10831084

10841085
理論的根拠: コマンドや式を許可しないのはなぜか? セキュリティ上の問題が生じる
10851086
可能性があるため。

en/terminal.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*terminal.txt* For Vim version 9.1. Last change: 2025 Feb 13
1+
*terminal.txt* For Vim version 9.1. Last change: 2025 Feb 22
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1092,11 +1092,11 @@ Currently supported commands:
10921092
Example in JSON: >
10931093
["drop", "path/file.txt", {"ff": "dos"}]
10941094
1095-
A trick to have Vim send this escape sequence: >
1096-
exe "set t_ts=\<Esc>]51; t_fs=\x07"
1097-
let &titlestring = '["call","Tapi_TryThis",["hello",123]]'
1098-
redraw
1099-
set t_ts& t_fs&
1095+
You can use |echoraw()| to make Vim send this escape sequence: >
1096+
call echoraw("\<ESC>]51;[\"call\", \"Tapi_TryThis\", [\"hello\", 123]]\x07")
1097+
call echoraw("\<Esc>]51;[\"drop\", \"README.md\"]\x07")
1098+
Note: JSON requires double quotes around string values, hence those have to be
1099+
escaped.
11001100

11011101
Rationale: Why not allow for any command or expression? Because that might
11021102
create a security problem.

0 commit comments

Comments
 (0)