Skip to content

Commit 08b1c61

Browse files
committed
runtime(doc): clarify terminal capabilities for focus reporting
closes: #13440 Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 57f9ce1 commit 08b1c61

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

runtime/doc/term.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*term.txt* For Vim version 9.0. Last change: 2023 Oct 25
1+
*term.txt* For Vim version 9.0. Last change: 2023 Nov 04
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -332,11 +332,16 @@ using the "xterm" workaround. These are the relevant entries (so far):
332332

333333
XM "\033[?1006;1004;1000%?%p1%{1}%=%th%el%;"
334334
mouse enable / disable |t_XM|
335+
FE "\033[?1004h" enable focus event tracking |t_fe|
336+
FD "\033[?1004l" disable focus event tracking |t_fd|
335337

336338
The "XM" entry includes "1006" to enable SGR style mouse reporting. This
337339
supports columns above 223. It also includes "1004" which enables focus
338-
reporting. The t_fe and t_fd entries can be left empty (they don't have
339-
entries in terminfo/termcap anyway).
340+
reporting.
341+
Note: As of 2023, the "1004" is currently not used by Vim itself, instead
342+
it is recommended to set focus reporting independently of mouse tracking by
343+
the |t_fe| and |t_fd| entries, as ncurses also starts to use with the latest
344+
versions (and will then also end up in terminfo/termcap).
340345

341346
*xterm-kitty* *kitty-terminal*
342347
The Kitty terminal is a special case. Mainly because it works differently

0 commit comments

Comments
 (0)