summaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2023-01-10 12:37:38 +0000
committerBram Moolenaar <Bram@vim.org>2023-01-10 12:37:38 +0000
commit06cd14d0bf990d0002d61a721aa3d5b8a3c44028 (patch)
treeb36b89cc127cf2e952238f530c7c3053dc868658 /src/os_unix.c
parent1b5f03ec9c5551047d5de8d845541dd3201abe7c (diff)
downloadvim-git-06cd14d0bf990d0002d61a721aa3d5b8a3c44028.tar.gz
patch 9.0.1168: code to enable/disable mouse is not from terminfo/termcapv9.0.1168
Problem: Code to enable/disable mouse is not from terminfo/termcap. Solution: Request the "XM" entry and use it to set 'ttymouse' if possible.
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 9d8d46650..194f4be57 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -3780,7 +3780,11 @@ mch_setmouse(int on)
}
#endif
- if (ttym_flags == TTYM_SGR)
+ if (T_CXM != NULL && *T_CXM != NUL)
+ {
+ term_enable_mouse(on);
+ }
+ else if (ttym_flags == TTYM_SGR)
{
// SGR mode supports columns above 223
out_str_nf((char_u *)(on ? "\033[?1006h" : "\033[?1006l"));