Patch 9.0.0787

24 views
Skip to first unread message

Bram Moolenaar

unread,
Oct 18, 2022, 8:34:31 AM10/18/22
to vim...@googlegroups.com

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


*** ../vim-9.0.0786/src/os_win32.c 2022-10-16 19:45:24.558960645 +0100
--- src/os_win32.c 2022-10-18 13:32:49.424975101 +0100
***************
*** 1397,1410 ****
// unprocessed mouse click?
if (g_nMouseClick != -1)
return TRUE;
!
if (pmer->dwEventFlags == MOUSE_WHEELED
|| pmer->dwEventFlags == MOUSE_HWHEELED)
{
decode_mouse_wheel(pmer);
return TRUE; // we now should have a mouse scroll in g_nMouseClick
}
!
nButton = -1;
g_xMouse = pmer->dwMousePosition.X;
g_yMouse = pmer->dwMousePosition.Y;
--- 1397,1410 ----
// unprocessed mouse click?
if (g_nMouseClick != -1)
return TRUE;
! #ifdef VIMDLL
if (pmer->dwEventFlags == MOUSE_WHEELED
|| pmer->dwEventFlags == MOUSE_HWHEELED)
{
decode_mouse_wheel(pmer);
return TRUE; // we now should have a mouse scroll in g_nMouseClick
}
! #endif
nButton = -1;
g_xMouse = pmer->dwMousePosition.X;
g_yMouse = pmer->dwMousePosition.Y;
*** ../vim-9.0.0786/src/version.c 2022-10-18 13:11:18.466896436 +0100
--- src/version.c 2022-10-18 13:31:00.853134212 +0100
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 787,
/**/

--
If you only have a hammer, you tend to see every problem as a nail.
If you only have MS-Windows, you tend to solve every problem by rebooting.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

John Marriott

unread,
Oct 18, 2022, 3:09:18 PM10/18/22
to vim...@googlegroups.com

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
os_win32.c.9.0.0787.patch

Bram Moolenaar

unread,
Oct 18, 2022, 4:51:02 PM10/18/22
to vim...@googlegroups.com, John Marriott
Thanks. It's a temporary solution, but I have no idea how long it takes
before we have it working again.

--
LETTERS TO THE EDITOR (The Times of London)

Dear Sir,

I am firmly opposed to the spread of microchips either to the home or
to the office.  We have more than enough of them foisted upon us in
public places.  They are a disgusting Americanism, and can only result
in the farmers being forced to grow smaller potatoes, which in turn
will cause massive unemployment in the already severely depressed
agricultural industry.

Yours faithfully,
        Capt. Quinton D'Arcy, J. P.
        Sevenoaks

Christopher Plewright

unread,
Oct 18, 2022, 9:54:42 PM10/18/22
to vim_dev
Thanks John, 

Yeah, I think I have it working now - making mouse scroll events work in windows terminal even without dll.  But for some reason, it's still not recognising any mousscroll mappings (with or without the dll).  I want to make sure it also does mappings properly before I submit a new patch. 

Anyway, I will make sure to check mingw64  toolchain, and gcc compilations, for these sorts of warnings in the future.  Feel like its something that I should have done.

Cheers,

Chris.   

Reply all
Reply to author
Forward
0 new messages