diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-12-05 15:04:54 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-12-05 15:04:54 -0800 |
commit | 0167c57cdf3bcdb1102d4d10d02c0eb078dc8736 (patch) | |
tree | f8d51092c7173018bea7d7171ef5bf5636107fd9 | |
parent | a8a8965b1b313acb7a5d7395aa72c68348e0ddb2 (diff) | |
download | view.love-0167c57cdf3bcdb1102d4d10d02c0eb078dc8736.tar.gz |
consume a mouse click when switching sides
This way we can have the log side actually take focus sometimes.
-rw-r--r-- | source.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source.lua b/source.lua index dbf1640..dfffd62 100644 --- a/source.lua +++ b/source.lua @@ -299,12 +299,14 @@ function source.mouse_pressed(x,y, mouse_button) --? print('click on edit side') if Focus ~= 'edit' then Focus = 'edit' + return end edit.mouse_pressed(Editor_state, x,y, mouse_button) elseif Show_log_browser_side and Log_browser_state.left <= x and x < Log_browser_state.right then --? print('click on log_browser side') if Focus ~= 'log_browser' then Focus = 'log_browser' + return end log_browser.mouse_pressed(Log_browser_state, x,y, mouse_button) for _,line_cache in ipairs(Editor_state.line_cache) do line_cache.starty = nil end -- just in case we scroll |