@@ -912,7 +912,7 @@ def get_trg(type, *args, **kwargs):
912
912
codeintel_log .handlers = list (_hdlrs ) + [hdlr ]
913
913
ctlr = LogEvalController (codeintel_log )
914
914
try :
915
- global last_trigger_name , last_citdl_expr
915
+ global last_trigger_name , last_citdl_expr , is_active_popup
916
916
trigger_changed = False
917
917
918
918
current_trigger_name = trigger .name if trigger else None
@@ -925,7 +925,9 @@ def get_trg(type, *args, **kwargs):
925
925
if current_trigger_name != last_trigger_name :
926
926
log .debug ("hiding automplete-panel, b/c trigger changed: FROM %r TO %r " % (last_trigger_name , (trigger .name if trigger else 'None' ) ))
927
927
trigger_changed = True
928
- view .run_command ('hide_auto_complete' )
928
+ if is_active_popup :
929
+ is_active_popup = False
930
+ view .run_command ('hide_auto_complete' )
929
931
930
932
last_trigger_name = current_trigger_name
931
933
@@ -1039,7 +1041,7 @@ def generateEnvironment(mgr, lang, folders):
1039
1041
config ["codeintel_scan_extra_dir" ] = scan_extra_dir
1040
1042
1041
1043
for conf , p in config .items ():
1042
- if isinstance (p , str ) and p .startswith ('~' ):
1044
+ if isinstance (p , unicode ) and p .startswith ('~' ):
1043
1045
config [conf ] = os .path .expanduser (p )
1044
1046
1045
1047
# Setup environment variables
@@ -1435,11 +1437,6 @@ def on_activated(self, view):
1435
1437
if codeintel_enabled ():
1436
1438
sublime .set_timeout (settings_manager .checkProjectFileChanged , 100 )
1437
1439
1438
- def on_text_command (self , window , command_name , args ):
1439
- global is_active_popup , last_trigger_name
1440
- if command_name not in ["insert" ]:
1441
- is_active_popup = False
1442
-
1443
1440
#rescan a buffer on_pre_save, if it is dirty
1444
1441
def on_pre_save (self , view ):
1445
1442
settings_manager .update ()
@@ -1509,6 +1506,8 @@ def on_modified(self, view):
1509
1506
current_command = view .command_history (0 )
1510
1507
1511
1508
if current_command [0 ] not in ['insert' ]:
1509
+ global is_active_popup
1510
+ is_active_popup = False
1512
1511
view .run_command ('hide_auto_complete' )
1513
1512
#show subsequent calltips instantly, if appropriate
1514
1513
if current_command [0 ] in ['commit_completion' ,'insert_snippet' ]:
0 commit comments