Patch 8.0.1582
Problem: In the MS-Windows console mouse movement is not used.
Solution: Pass mouse movement events when useful.
Files: src/os_win32.c, src/proto/os_win32.pro, src/feature.h
*** ../vim-8.0.1581/src/os_win32.c 2018-03-04 18:07:04.276592296 +0100
--- src/os_win32.c 2018-03-06 17:05:38.730025520 +0100
***************
*** 1164,1169 ****
--- 1164,1181 ----
SetConsoleMode(g_hConIn, cmodein);
}
+
+ #if defined(FEAT_BEVAL_TERM) || defined(PROTO)
+ /*
+ * Called when 'balloonevalterm' changed.
+ */
+ void
+ mch_bevalterm_changed(void)
+ {
+ mch_setmouse(g_fMouseActive);
+ }
+ #endif
+
/*
* Decode a MOUSE_EVENT. If it's a valid event, return MOUSE_LEFT,
* MOUSE_MIDDLE, or MOUSE_RIGHT for a click; MOUSE_DRAG for a mouse
***************
*** 1243,1249 ****
if (pmer->dwEventFlags == MOUSE_MOVED)
{
! /* ignore MOUSE_MOVED events if (x, y) hasn't changed. (We get these
* events even when the mouse moves only within a char cell.) */
if (s_xOldMouse == g_xMouse && s_yOldMouse == g_yMouse)
return FALSE;
--- 1255,1261 ----
if (pmer->dwEventFlags == MOUSE_MOVED)
{
! /* Ignore MOUSE_MOVED events if (x, y) hasn't changed. (We get these
* events even when the mouse moves only within a char cell.) */
if (s_xOldMouse == g_xMouse && s_yOldMouse == g_yMouse)
return FALSE;
***************
*** 1252,1262 ****
/* If no buttons are pressed... */
if ((pmer->dwButtonState & ((1 << cButtons) - 1)) == 0)
{
/* If the last thing returned was MOUSE_RELEASE, ignore this */
if (s_fReleased)
! return FALSE;
- nButton = MOUSE_RELEASE;
s_fReleased = TRUE;
}
else /* one or more buttons pressed */
--- 1264,1283 ----
/* If no buttons are pressed... */
if ((pmer->dwButtonState & ((1 << cButtons) - 1)) == 0)
{
+ nButton = MOUSE_RELEASE;
+
/* If the last thing returned was MOUSE_RELEASE, ignore this */
if (s_fReleased)
! {
! #ifdef FEAT_BEVAL_TERM
! /* do return mouse move events when we want them */
! if (p_bevalterm)
! nButton = MOUSE_DRAG;
! else
! #endif
! return FALSE;
! }
s_fReleased = TRUE;
}
else /* one or more buttons pressed */
*** ../vim-8.0.1581/src/proto/os_win32.pro 2018-02-22 21:06:44.558819084
+0100
--- src/proto/os_win32.pro 2018-03-06 15:54:19.952723508 +0100
***************
*** 6,11 ****
--- 6,12 ----
void dyn_libintl_end(void);
void PlatformId(void);
void mch_setmouse(int on);
+ void mch_bevalterm_changed(void);
void mch_update_cursor(void);
int mch_char_avail(void);
int mch_check_messages(void);
*** ../vim-8.0.1581/src/feature.h 2018-03-06 15:06:15.314321664 +0100
--- src/feature.h 2018-03-06 15:03:02.503485392 +0100
***************
*** 1318,1324 ****
/*
* +balloon_eval_term Allow balloon expression evaluation in the terminal.
*/
! #if defined(FEAT_HUGE) && defined(UNIX) && defined(FEAT_TIMERS)
# define FEAT_BEVAL_TERM
#endif
--- 1318,1324 ----
/*
* +balloon_eval_term Allow balloon expression evaluation in the terminal.
*/
! #if defined(FEAT_HUGE) && (defined(UNIX) || defined(WIN32)) &&
defined(FEAT_TIMERS)
# define FEAT_BEVAL_TERM
#endif
*** ../vim-8.0.1581/src/version.c 2018-03-06 16:11:42.910436897 +0100
--- src/version.c 2018-03-06 17:08:28.993876466 +0100
***************
*** 768,769 ****
--- 768,771 ----
{ /* Add new patch number below this line */
+ /**/
+ 1582,
/**/
--
Hacker: Someone skilled in computer programming (good guy).
Cracker: A hacker that uses his skills to crack software (bad guy).
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
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].
For more options, visit https://groups.google.com/d/optout.