diff src/os_unix.c @ 31672:9dc48932db8e v9.0.1168

patch 9.0.1168: code to enable/disable mouse is not from terminfo/termcap Commit: https://github.com/vim/vim/commit/06cd14d0bf990d0002d61a721aa3d5b8a3c44028 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 10 12:37:38 2023 +0000 patch 9.0.1168: code to enable/disable mouse is not from terminfo/termcap Problem: Code to enable/disable mouse is not from terminfo/termcap. Solution: Request the "XM" entry and use it to set 'ttymouse' if possible.
author Bram Moolenaar <Bram@vim.org>
date Tue, 10 Jan 2023 13:45:04 +0100
parents a2997ac0ca2c
children 3365a601e73b
line wrap: on
line diff
--- 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"));