To: vim_dev@googlegroups.com Subject: Patch 7.4.2238 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.2238 Problem: With SGR mouse reporting (suckless terminal) the mouse release and scroll up/down is confused. Solution: Don't see a release as a scroll up/down. (Ralph Eastwood) Files: src/term.c *** ../vim-7.4.2237/src/term.c 2016-08-14 16:07:44.725705357 +0200 --- src/term.c 2016-08-21 21:01:24.836288814 +0200 *************** *** 4939,4945 **** button = getdigits(&p); mouse_code = 0; ! switch( button ) { case 4: mouse_code = MOUSE_LEFT; break; case 1: mouse_code = MOUSE_RIGHT; break; --- 4939,4945 ---- button = getdigits(&p); mouse_code = 0; ! switch (button) { case 4: mouse_code = MOUSE_LEFT; break; case 1: mouse_code = MOUSE_RIGHT; break; *************** *** 4947,4953 **** default: return -1; } ! switch( action ) { case 31: /* Initial press */ if (*p++ != ';') --- 4947,4953 ---- default: return -1; } ! switch (action) { case 31: /* Initial press */ if (*p++ != ';') *************** *** 5096,5104 **** else if (orig_num_clicks == 4) modifiers |= MOD_MASK_4CLICK; ! /* Work out our pseudo mouse event */ key_name[0] = (int)KS_EXTRA; ! if (wheel_code != 0) { if (wheel_code & MOUSE_CTRL) modifiers |= MOD_MASK_CTRL; --- 5096,5106 ---- else if (orig_num_clicks == 4) modifiers |= MOD_MASK_4CLICK; ! /* Work out our pseudo mouse event. Note that MOUSE_RELEASE gets ! * added, then it's not mouse up/down. */ key_name[0] = (int)KS_EXTRA; ! if (wheel_code != 0 ! && (wheel_code & MOUSE_RELEASE) != MOUSE_RELEASE) { if (wheel_code & MOUSE_CTRL) modifiers |= MOD_MASK_CTRL; *** ../vim-7.4.2237/src/version.c 2016-08-21 19:07:14.265008108 +0200 --- src/version.c 2016-08-21 21:02:29.511705696 +0200 *************** *** 765,766 **** --- 765,768 ---- { /* Add new patch number below this line */ + /**/ + 2238, /**/ -- hundred-and-one symptoms of being an internet addict: 44. Your friends no longer send you e-mail...they just log on to your IRC channel. /// Bram Moolenaar -- Bram@Moolenaar.net -- 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 ///