Last active
August 29, 2015 14:01
-
-
Save pkulchenko/b01345733efafab3307b to your computer and use it in GitHub Desktop.
Editor auto-focus by mouse
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function focusOnEnterWindow(editor) | |
editor:Connect(wx.wxEVT_ENTER_WINDOW, function() editor:SetFocus() end) | |
end | |
return { | |
name = "Editor auto-focus by mouse", | |
description = "Moves focus to an editor tab the mouse is over.", | |
author = "Paul Kulchenko", | |
version = 0.1, | |
onEditorLoad = function(self, editor) focusOnEnterWindow(editor) end, | |
onEditorNew = function(self, editor) focusOnEnterWindow(editor) end, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment