Skip to content

Commit

Permalink
Don't re-focus the active_view in in-active window.
Browse files Browse the repository at this point in the history
When creating the HUD view, it can sometimes steal focus, so we re-focus the active_view.
When starting up with multiple windows, this leads to cursor being placed in the in-active window.
  • Loading branch information
DisposaBoy committed Jun 16, 2019
1 parent d2d1002 commit 17d34c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gosubl/margo.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ def _gs_init(self):

def _hud_create_panel(self, win):
view = win.create_output_panel(self.hud_name)
win.focus_view(win.active_view())
if win == sublime.active_window():
win.focus_view(win.active_view())
syntax = gs.tm_path('hud')
settings = view.settings()
if settings.get('syntax') == syntax:
Expand Down

0 comments on commit 17d34c1

Please sign in to comment.