comparison runtime/doc/term.txt @ 31293:ff4473b3fc58 v9.0.0980

patch 9.0.0980: the keyboard state response may end up in a shell command Commit: https://github.com/vim/vim/commit/733a69b29f0b0c3d2ddca463a41bdd912379bc5e Author: Bram Moolenaar <Bram@vim.org> Date: Thu Dec 1 12:03:47 2022 +0000 patch 9.0.0980: the keyboard state response may end up in a shell command Problem: The keyboard state response may end up in a shell command. Solution: Only request the keyboard protocol state when the typeahead is empty, no more commands are following and not exiting. Add the t_RK termcap entry for this.
author Bram Moolenaar <Bram@vim.org>
date Thu, 01 Dec 2022 13:15:03 +0100
parents 5b71c3884a2a
children 15c80d8bc515
comparison
equal deleted inserted replaced
31292:f319f6200220 31293:ff4473b3fc58
87 Output resumes when you hit <BS>. 87 Output resumes when you hit <BS>.
88 88
89 Note: When 't_ti' is not empty, Vim assumes that it causes switching to the 89 Note: When 't_ti' is not empty, Vim assumes that it causes switching to the
90 alternate screen. This may slightly change what happens when executing a 90 alternate screen. This may slightly change what happens when executing a
91 shell command or exiting Vim. To avoid this use 't_TI' and 't_TE'. 91 shell command or exiting Vim. To avoid this use 't_TI' and 't_TE'.
92
93 Vim will try to detect what keyboard protocol the terminal is using with the
94 't_RK' termcap entry. This is sent after 't_TI', but only when there is no
95 work to do (no typeahead and no pending commands). That is to avoid the
96 response to end up in a shell command or arrive after Vim exits.
92 97
93 *xterm-bracketed-paste* 98 *xterm-bracketed-paste*
94 When the 't_BE' option is set then 't_BE' will be sent to the 99 When the 't_BE' option is set then 't_BE' will be sent to the
95 terminal when entering "raw" mode and 't_BD' when leaving "raw" mode. The 100 terminal when entering "raw" mode and 't_BD' when leaving "raw" mode. The
96 terminal is then expected to put 't_PS' before pasted text and 't_PE' after 101 terminal is then expected to put 't_PS' before pasted text and 't_PE' after
386 |termcap-cursor-shape| 391 |termcap-cursor-shape|
387 t_RV request terminal version string (works for *t_RV* *'t_RV'* 392 t_RV request terminal version string (works for *t_RV* *'t_RV'*
388 xterm and other terminal emulators) The 393 xterm and other terminal emulators) The
389 response is stored in |v:termresponse| |xterm-8bit| 394 response is stored in |v:termresponse| |xterm-8bit|
390 |'ttymouse'| |xterm-codes| 395 |'ttymouse'| |xterm-codes|
396 t_RK request terminal keyboard protocol state; *t_RK* *'t_RK'*
397 sent after |t_TI|
391 t_u7 request cursor position (for xterm) *t_u7* *'t_u7'* 398 t_u7 request cursor position (for xterm) *t_u7* *'t_u7'*
392 see |'ambiwidth'| 399 see |'ambiwidth'|
393 The response is stored in |v:termu7resp| 400 The response is stored in |v:termu7resp|
394 t_RF request terminal foreground color *t_RF* *'t_RF'* 401 t_RF request terminal foreground color *t_RF* *'t_RF'*
395 The response is stored in |v:termrfgresp| 402 The response is stored in |v:termrfgresp|