Skip to content

Commit

Permalink
Delay setting handling_mouse to true
Browse files Browse the repository at this point in the history
Otherwise, the function can return without setting it back to false.
  • Loading branch information
dstein64 committed Nov 26, 2024
1 parent f7f6113 commit 9e30464
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/scrollview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2789,7 +2789,6 @@ end
-- handling is for navigation (dragging scrollbars and navigating to signs).
-- If primary is false, the handling is for context (showing popups with info).
local handle_mouse = function(button, primary)
handling_mouse = true
local valid_buttons = {
'left', 'middle', 'right', 'x1', 'x2',
'c-left', 'c-middle', 'c-right', 'c-x1', 'c-x2',
Expand All @@ -2813,6 +2812,7 @@ local handle_mouse = function(button, primary)
local resume_memoize = memoize
start_memoize()
pcall(function()
handling_mouse = true
-- Re-send the click, so its position can be obtained through
-- read_input_stream().
fn.feedkeys(mousedown, 'ni')
Expand Down

0 comments on commit 9e30464

Please sign in to comment.