On 18-Oct-2022 23:34, Bram Moolenaar wrote:
Patch 9.0.0787 (after 9.0.0775)
Problem:    MS-Windows: mouse scrolling in terminal misbehaves without dll.
Solution:   Add #ifdef as a temporary solution. (Christopher Plewright,
             closes #11392)
Files:      src/os_win32.c


I know this was a temporary solution, but after this patch mingw64 (gcc 12.2.0) gives this warning in a non-gui build:
<snip>
gcc -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 -freg-struct-return -fpie -fPIE  os_win32.c -o objx86-64/os_win32.o os_win32.c:1257:1: warning: 'decode_mouse_wheel' defined but not used [-Wunused-function]
 1257 | decode_mouse_wheel(MOUSE_EVENT_RECORD *pmer)
      | ^~~~~~~~~~~~~~~~~~
</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/8c9c415f-8e41-c7a0-6dbc-1a4821e9118e%40internode.on.net.
--- os_win32.c.orig     2022-10-19 05:53:52.120873800 +1100
+++ os_win32.c  2022-10-19 06:00:33.470687000 +1100
@@ -1231,7 +1231,7 @@
 }
 # endif
 
-
+#ifdef VIMDLL
 /*
  * Win32 console mouse scroll event handler.
  * Loosely based on the _OnMouseWheel() function in gui_w32.c
@@ -1324,6 +1324,7 @@
 
     return;
 }
+#endif
 
 /*
  * Decode a MOUSE_EVENT.  If it's a valid event, return MOUSE_LEFT,

Raspunde prin e-mail lui