To: vim_dev@googlegroups.com Subject: Patch 9.0.0136 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.0136 Problem: After CTRL-Left-mouse click a mouse scroll also has CTRL. Solution: Reset orig_mouse_code also for wheel events. (closes #10840) Files: src/mouse.c *** ../vim-9.0.0135/src/mouse.c 2022-07-25 18:13:33.050580738 +0100 --- src/mouse.c 2022-08-03 15:47:28.930178189 +0100 *************** *** 2403,2409 **** // Apparently 0x23 and 0x24 are used by rxvt scroll wheel. // And 0x40 and 0x41 are used by some xterm emulator. wheel_code = mouse_code - (mouse_code >= 0x40 ? 0x40 : 0x23) ! + MOUSEWHEEL_LOW; } # endif --- 2403,2409 ---- // Apparently 0x23 and 0x24 are used by rxvt scroll wheel. // And 0x40 and 0x41 are used by some xterm emulator. wheel_code = mouse_code - (mouse_code >= 0x40 ? 0x40 : 0x23) ! + MOUSEWHEEL_LOW; } # endif *************** *** 2788,2795 **** is_drag = TRUE; current_button = held_button; } ! else if (wheel_code == 0) { # ifdef CHECK_DOUBLE_CLICK # ifdef FEAT_MOUSE_GPM /* --- 2788,2797 ---- is_drag = TRUE; current_button = held_button; } ! else { + if (wheel_code == 0) + { # ifdef CHECK_DOUBLE_CLICK # ifdef FEAT_MOUSE_GPM /* *************** *** 2849,2855 **** orig_num_clicks = NUM_MOUSE_CLICKS(mouse_code); # endif is_click = TRUE; ! orig_mouse_code = mouse_code; } if (!is_drag) held_button = mouse_code & MOUSE_CLICK_MASK; --- 2851,2858 ---- orig_num_clicks = NUM_MOUSE_CLICKS(mouse_code); # endif is_click = TRUE; ! } ! orig_mouse_code = mouse_code; } if (!is_drag) held_button = mouse_code & MOUSE_CLICK_MASK; *** ../vim-9.0.0135/src/version.c 2022-08-02 12:15:48.724595679 +0100 --- src/version.c 2022-08-03 15:47:01.910024122 +0100 *************** *** 737,738 **** --- 737,740 ---- { /* Add new patch number below this line */ + /**/ + 136, /**/ -- Google is kind of like Dr. Who's Tardis; it's weirder on the inside than on the outside... /// Bram Moolenaar -- Bram@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 ///