Browse Source

add more delay to on_activated events

master
Randy Lai 5 years ago
parent
commit
896c208124
  1. 18
      src/project_manager.py

18
src/project_manager.py

@ -16,19 +16,23 @@ def subl(args=[]):
executable_path = app_path + 'Contents/SharedSupport/bin/subl'
subprocess.Popen([executable_path] + args)
def on_activated():
def focus():
# fix focus on windows
window = sublime.active_window()
view = window.active_view()
window.run_command('focus_neighboring_group')
window.focus_view(view)
if sublime.platform() == 'windows':
# fix focus on windows
window.run_command('focus_neighboring_group')
window.focus_view(view)
def on_activated():
window = sublime.active_window()
view = window.active_view()
sublime_plugin.on_activated(view.id())
sublime_plugin.on_activated_async(view.id())
sublime.set_timeout(on_activated, 300)
if sublime.platform() == 'windows':
sublime.set_timeout(focus, 300)
sublime.set_timeout(on_activated, 1000)
def expand_folder(folder, project_file):

Loading…
Cancel
Save