@@ -19,6 +19,7 @@ def exit(self):
1919 req_dict = self .create_req_dict ("exit" )
2020 json_str = json_helpers .encode (req_dict )
2121 self .__comm .postCmd (json_str )
22+ self .__comm .postCmdToWorker (json_str )
2223
2324 def configure (self , host_info = "Sublime Text" , file = None , format_options = None ):
2425 args = {"hostInfo" : host_info , "formatOptions" : format_options , "file" : file }
@@ -39,6 +40,7 @@ def change(self, path, begin_location=Location(1, 1), end_location=Location(1, 1
3940 req_dict = self .create_req_dict ("change" , args )
4041 json_str = json_helpers .encode (req_dict )
4142 self .__comm .postCmd (json_str )
43+ self .__comm .postCmdToWorker (json_str )
4244
4345 def completions (self , path , location = Location (1 , 1 ), prefix = "" , on_completed = None ):
4446 args = {"file" : path , "line" : location .line , "offset" : location .offset , "prefix" : prefix }
@@ -104,12 +106,14 @@ def open(self, path):
104106 req_dict = self .create_req_dict ("open" , args )
105107 json_str = json_helpers .encode (req_dict )
106108 self .__comm .postCmd (json_str )
109+ self .__comm .postCmdToWorker (json_str )
107110
108111 def close (self , path ):
109112 args = {"file" : path }
110113 req_dict = self .create_req_dict ("close" , args )
111114 json_str = json_helpers .encode (req_dict )
112115 self .__comm .postCmd (json_str )
116+ self .__comm .postCmdToWorker (json_str )
113117
114118 def references (self , path , location = Location (1 , 1 )):
115119 args = {"file" : path , "line" : location .line , "offset" : location .offset }
@@ -122,14 +126,15 @@ def reload(self, path, alternate_path):
122126 args = {"file" : path , "tmpfile" : alternate_path }
123127 req_dict = self .create_req_dict ("reload" , args )
124128 json_str = json_helpers .encode (req_dict )
125- response_dict = self .__comm .sendCmdSync (json_str , req_dict [ "seq" ] )
126- return response_dict
129+ self .__comm .postCmd (json_str )
130+ self . __comm . postCmdToWorker ( json_str )
127131
128132 def reload_async (self , path , alternate_path , on_completed ):
129133 args = {"file" : path , "tmpfile" : alternate_path }
130134 req_dict = self .create_req_dict ("reload" , args )
131135 json_str = json_helpers .encode (req_dict )
132136 self .__comm .sendCmdAsync (json_str , req_dict ["seq" ], on_completed )
137+ self .__comm .postCmdToWorker (json_str )
133138
134139 def rename (self , path , location = Location (1 , 1 )):
135140 args = {"file" : path , "line" : location .line , "offset" : location .offset }
@@ -142,7 +147,7 @@ def request_get_err(self, delay=0, pathList=[]):
142147 args = {"files" : pathList , "delay" : delay }
143148 req_dict = self .create_req_dict ("geterr" , args )
144149 json_str = json_helpers .encode (req_dict )
145- self .__comm .postCmd (json_str )
150+ self .__comm .postCmdToWorker (json_str )
146151
147152 def type (self , path , location = Location (1 , 1 )):
148153 args = {"file" : path , "line" : location .line , "offset" : location .offset }
0 commit comments