Fixed setting editor focus when switching from commandbar on OSX (fixes #577).

This commit is contained in:
Paul Kulchenko
2016-01-24 17:51:27 -08:00
parent 5d44d19c4f
commit 3b7bfc8415
2 changed files with 14 additions and 1 deletions

View File

@@ -172,6 +172,10 @@ function SetEditorSelection(selection)
if editor then
editor:SetFocus()
editor:SetSTCFocus(true)
-- when the active editor is changed while the focus is away from the application
-- (as happens on OSX when the editor is selected from the command bar)
-- the focus stays on wxAuiToolBar component, so need to explicitly switch it.
if ide.osname == "Macintosh" and ide.infocus then ide.infocus = editor end
local id = editor:GetId()
FileTreeMarkSelected(openDocuments[id] and openDocuments[id].filePath or '')