diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-01-14 17:35:21 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-01-14 17:35:21 +0100 |
commit | 681fc3fa782e99fe69ed2c83c3e29109d2d61e1a (patch) | |
tree | 7aa5986843ee75f7a1337c18b022cf22841b00c9 /runtime/doc/term.txt | |
parent | 6601b62943a19d4f8818c3638440663d67a17b6a (diff) |
patch 8.2.2345: no focus events in a terminalv8.2.2345
Problem: No focus events in a terminal.
Solution: Add the t_fd and t_fe termcap entries and implement detecting
focus events. (Hayaki Saito, Magnus Groß, closes #7673,
closes #609, closes #5526)
Diffstat (limited to 'runtime/doc/term.txt')
-rw-r--r-- | runtime/doc/term.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt index 5b7850fe31..0456a8b89b 100644 --- a/runtime/doc/term.txt +++ b/runtime/doc/term.txt @@ -373,6 +373,10 @@ Added by Vim (there are no standard codes for these): t_Ri restore icon text from stack *t_Ri* *'t_Ri'* t_TE end of "raw" mode *t_TE* *'t_TE'* t_TI put terminal into "raw" mode *t_TI* *'t_TI'* + t_fd disable focus-event tracking *t_TI* *'t_TI'* + |xterm-focus-event| + t_fe enable focus-event tracking *t_TI* *'t_TI'* + |xterm-focus-event| Some codes have a start, middle and end part. The start and end are defined by the termcap option, the middle part is text. @@ -546,6 +550,16 @@ And run "xrdb -merge .Xresources" to make it effective. You can check the value with the context menu (right mouse button while CTRL key is pressed), there should be a tick at allow-window-ops. + *xterm-focus-event* +Some terminals including xterm support the focus event tracking feature. +If this feature is enabled by the 't_fe' sequence, special key sequences are +sent from the terminal to Vim every time the terminal gains or loses focus. +Vim fires focus events (|FocusGained|/|FocusLost|) by handling them accordingly. +Focus event tracking is disabled by a 't_fd' sequence when exiting "raw" mode. +If you would like to disable this feature, add the following to your .vimrc: + `set t_fd=` + `set t_fe=` + *termcap-colors* Note about colors: The 't_Co' option tells Vim the number of colors available. When it is non-zero, the 't_AB' and 't_AF' options are used to set the color. |