Skip to content

Instantly share code, notes, and snippets.

@pkulchenko
Last active August 29, 2015 14:01
Show Gist options
  • Save pkulchenko/b01345733efafab3307b to your computer and use it in GitHub Desktop.
Save pkulchenko/b01345733efafab3307b to your computer and use it in GitHub Desktop.
Editor auto-focus by mouse
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