On 10-Jan-2023 23:38, Bram Moolenaar wrote:
Patch 9.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.
Files: runtime/doc/options.txt, src/term.c, src/proto/term.pro,
src/termdefs.h, src/os_unix.c, src/optiondefs.h
After this patch msys64 (clang 15.0.5) gives this warning:
<snip>
clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN
-DFEAT_CLIPBOARD term.c -o gobjx86-64/term.o
term.c:2164:9: warning: variable 'did_set_ttym' set but not used
[-Wunused-but-set-variable]
int did_set_ttym = FALSE;
^
1 warning generated.
</snip>
The attached patch tries to fix it.
Cheers
John
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/8f0f4f93-f4a4-2d0b-74fc-825b2407cac4%40internode.on.net.
--- term.c.orig 2023-01-11 05:41:51.601366200 +1100
+++ term.c 2023-01-11 05:50:51.350287200 +1100
@@ -2159,6 +2159,7 @@
init_term_props(FALSE);
#endif
+#if defined(UNIX) || defined(VMS)
// If the first number in t_XM is 1006 then the terminal will support SGR
// mouse reporting.
int did_set_ttym = FALSE;
@@ -2175,7 +2176,6 @@
}
}
-#if defined(UNIX) || defined(VMS)
/*
* For Unix, set the 'ttymouse' option to the type of mouse to be used.
* The termcode for the mouse is added as a side effect in option.c.