From 9e30464f452dd61ed9ffe42b4965ef7b96f5b7e8 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 25 Nov 2024 20:39:43 -0500 Subject: [PATCH] Delay setting handling_mouse to true Otherwise, the function can return without setting it back to false. --- lua/scrollview.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/scrollview.lua b/lua/scrollview.lua index 4fd1a6e..180d8b3 100644 --- a/lua/scrollview.lua +++ b/lua/scrollview.lua @@ -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', @@ -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')