Skip to content

Commit

Permalink
adjustments for ST2
Browse files Browse the repository at this point in the history
  • Loading branch information
wizza-smile committed Feb 15, 2015
1 parent 55e9d52 commit 5f70b91
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions CodeComplice.py
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ def get_trg(type, *args, **kwargs):
codeintel_log.handlers = list(_hdlrs) + [hdlr]
ctlr = LogEvalController(codeintel_log)
try:
global last_trigger_name, last_citdl_expr
global last_trigger_name, last_citdl_expr, is_active_popup
trigger_changed = False

current_trigger_name = trigger.name if trigger else None
Expand All @@ -925,7 +925,9 @@ def get_trg(type, *args, **kwargs):
if current_trigger_name != last_trigger_name:
log.debug("hiding automplete-panel, b/c trigger changed: FROM %r TO %r " % (last_trigger_name, (trigger.name if trigger else 'None') ))
trigger_changed = True
view.run_command('hide_auto_complete')
if is_active_popup:
is_active_popup = False
view.run_command('hide_auto_complete')

last_trigger_name = current_trigger_name

Expand Down Expand Up @@ -1039,7 +1041,7 @@ def generateEnvironment(mgr, lang, folders):
config["codeintel_scan_extra_dir"] = scan_extra_dir

for conf, p in config.items():
if isinstance(p, str) and p.startswith('~'):
if isinstance(p, unicode) and p.startswith('~'):
config[conf] = os.path.expanduser(p)

# Setup environment variables
Expand Down Expand Up @@ -1435,11 +1437,6 @@ def on_activated(self, view):
if codeintel_enabled():
sublime.set_timeout(settings_manager.checkProjectFileChanged, 100)

def on_text_command(self, window, command_name, args):
global is_active_popup, last_trigger_name
if command_name not in ["insert"]:
is_active_popup = False

#rescan a buffer on_pre_save, if it is dirty
def on_pre_save(self, view):
settings_manager.update()
Expand Down Expand Up @@ -1509,6 +1506,8 @@ def on_modified(self, view):
current_command = view.command_history(0)

if current_command[0] not in ['insert']:
global is_active_popup
is_active_popup = False
view.run_command('hide_auto_complete')
#show subsequent calltips instantly, if appropriate
if current_command[0] in ['commit_completion','insert_snippet']:
Expand Down

0 comments on commit 5f70b91

Please sign in to comment.