A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/neovim/neovim/commit/54997363801bf9c7885cb8195fabe1ee82132516 below:

do not translate scroll keys into multiclicks · neovim/neovim@5499736 · GitHub

File tree Expand file treeCollapse file tree 2 files changed

+26

-2

lines changed

Filter options

Expand file treeCollapse file tree 2 files changed

+26

-2

lines changed Original file line number Diff line number Diff line change

@@ -288,8 +288,13 @@ static uint8_t check_multiclick(int code, int grid, int row, int col)

288 288

static int orig_mouse_row = 0;

289 289

static uint64_t orig_mouse_time = 0; // time of previous mouse click

290 290 291 -

if (code == KE_LEFTRELEASE || code == KE_RIGHTRELEASE

292 -

|| code == KE_MIDDLERELEASE) {

291 +

if (code == KE_LEFTRELEASE

292 +

|| code == KE_RIGHTRELEASE

293 +

|| code == KE_MIDDLERELEASE

294 +

|| code == KE_MOUSEDOWN

295 +

|| code == KE_MOUSEUP

296 +

|| code == KE_MOUSELEFT

297 +

|| code == KE_MOUSERIGHT) {

293 298

return 0;

294 299

}

295 300

uint64_t mouse_time = os_hrtime(); // time of current mouse click (ns)

Original file line number Diff line number Diff line change

@@ -1571,4 +1571,23 @@ describe('ui/mouse/input', function()

1571 1571

meths.set_option('winwidth', winwidth)

1572 1572

meths.input_mouse('left', 'release', '', 0, 0, 0)

1573 1573

end)

1574 + 1575 +

it('scroll keys are not translated into multiclicks #6211 #6989', function()

1576 +

meths.set_var('mouse_up', 0)

1577 +

meths.set_var('mouse_up2', 0)

1578 +

meths.set_var('mouse_up3', 0)

1579 +

meths.set_var('mouse_up4', 0)

1580 +

command('nnoremap <ScrollWheelUp> <Cmd>let g:mouse_up += 1<CR>')

1581 +

command('nnoremap <2-ScrollWheelUp> <Cmd>let g:mouse_up2 += 1<CR>')

1582 +

command('nnoremap <3-ScrollWheelUp> <Cmd>let g:mouse_up3 += 1<CR>')

1583 +

command('nnoremap <4-ScrollWheelUp> <Cmd>let g:mouse_up4 += 1<CR>')

1584 +

meths.input_mouse('wheel', 'up', '', 0, 0, 0)

1585 +

meths.input_mouse('wheel', 'up', '', 0, 0, 0)

1586 +

meths.input_mouse('wheel', 'up', '', 0, 0, 0)

1587 +

meths.input_mouse('wheel', 'up', '', 0, 0, 0)

1588 +

eq(4, meths.get_var('mouse_up'))

1589 +

eq(0, meths.get_var('mouse_up2'))

1590 +

eq(0, meths.get_var('mouse_up3'))

1591 +

eq(0, meths.get_var('mouse_up4'))

1592 +

end)

1574 1593

end)

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4