0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

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.
This commit is contained in:
Bram Moolenaar
2023-01-10 12:37:38 +00:00
parent 1b5f03ec9c
commit 06cd14d0bf
7 changed files with 48 additions and 7 deletions

View File

@@ -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"));