summaryrefslogtreecommitdiffstats
path: root/runtime/doc/term.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2023-01-09 20:12:45 +0000
committerBram Moolenaar <Bram@vim.org>2023-01-09 20:12:45 +0000
commit1b5f03ec9c5551047d5de8d845541dd3201abe7c (patch)
tree10618372a4087823169258cef47673cc03a64205 /runtime/doc/term.txt
parentd41262ed06564cef98a3800e2928e6e0db91abbf (diff)
Update runtime files
Diffstat (limited to 'runtime/doc/term.txt')
-rw-r--r--runtime/doc/term.txt24
1 files changed, 22 insertions, 2 deletions
diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt
index 8b8214c300..3336889852 100644
--- a/runtime/doc/term.txt
+++ b/runtime/doc/term.txt
@@ -1,4 +1,4 @@
-*term.txt* For Vim version 9.0. Last change: 2023 Jan 01
+*term.txt* For Vim version 9.0. Last change: 2023 Jan 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -322,6 +322,9 @@ using the "xterm" workaround. These are the relevant entries (so far):
PS "\033[200~" pasted text start |t_PS|
PE "\033[201~" pasted text end |t_PE|
+ XM "\033[?1006;1000%?%p1%{1}%=%th%el%;"
+ mouse enable / disable |t_XM|
+
*xterm-kitty* *kitty-terminal*
The Kitty terminal is a special case. Mainly because it works differently
from most other terminals, but also because, instead of trying the fit in and
@@ -337,7 +340,7 @@ this. However, Kitty is not fully xterm compatible. The author suggested to
ignore the "xterm-" prefix and use the terminfo entry anyway, so that is what
happens now, the builtin xterm termcap entries are not used. However, the
t_RV is set, otherwise other things would not work, such as automatically
-setting 'ttymouse' to "sgr".
+setting 'ttymouse' to "sgr" (at least until |t_XM| is being used for this).
It is not clear why kitty sets $TERM to "xterm-kitty", the terminal isn't
really xterm compatible. "kitty" would be more appropriate, but a terminfo
@@ -446,6 +449,8 @@ Added by Vim (there are no standard codes for these):
xterm and other terminal emulators) The
response is stored in |v:termresponse| |xterm-8bit|
|'ttymouse'| |xterm-codes|
+ t_XM enable/disable mouse reporting, *t_XM* *'t_XM'*
+ see |mouse-reporting| below
t_RK request terminal keyboard protocol state; *t_RK* *'t_RK'*
sent after |t_TI|
t_u7 request cursor position (for xterm) *t_u7* *'t_u7'*
@@ -499,6 +504,21 @@ t_SH must take one argument:
t_RS is sent only if the response to t_RV has been received. It is not used
on Mac OS when Terminal.app could be recognized from the termresponse.
+ *mouse-reporting*
+Many terminals can report mouse clicks and some can report mouse movement and
+dragging. Vim needs to know what codes are being used for this.
+
+The "XM" terminfo/termcap entry is used for this. Vim also has the 'ttymouse'
+option to specify the mouse protocol being used. See the option for the
+possible values.
+
+If Vim can read the "XM" terminfo/termcap entry then it will be used for
+enabling and disabling the mouse reporting. If it is missing, then the value
+from 'ttymouse' is used to decide how to do this.
+
+If the "XM" entry exists and the first number is "1006" then 'ttymouse' will
+be set to "sgr", unless it was already set earlier.
+
KEY CODES *terminal-key-codes*
Note: Use the <> form if possible