Skip to content

Commit a962ae2

Browse files
committed
fix issue: on_query_context doesn't return result. and fix reload_buffer
1 parent fabb8d5 commit a962ae2

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

libs/viewhelpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ def reload_buffer(view, client_info=None):
203203
if not IS_ST2:
204204
if not client_info:
205205
client_info = cli.get_or_add_file(view.file_name())
206-
client_info.change_count = view.change_count()
207-
client_info.pending_changes = False
206+
client_info.change_count = view.change_count()
207+
client_info.pending_changes = False
208208

209209

210210
def check_update_view(view):

listeners/idle.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ def on_activated_with_info(self, view, info):
2424
self.change_focus = True
2525

2626
def post_on_modified(self, view):
27-
self.modified = True
28-
self.set_on_idle_timer(100)
27+
if not is_special_view(view):
28+
self.modified = True
29+
self.set_on_idle_timer(100)
2930

3031
def on_selection_modified_with_info(self, view, info):
3132
if self.modified:

listeners/listeners.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def on_query_completions(self, view, prefix, locations):
212212

213213
def on_query_context(self, view, key, operator, operand, match_all):
214214
log.debug("on_query_context")
215-
EventHub.run_listeners("on_query_context", view, key, operator, operand, match_all)
215+
return EventHub.run_listener_with_return("on_query_context", view, key, operator, operand, match_all)
216216

217217
def on_close(self, view):
218218
log.debug("on_close")

0 commit comments

Comments
 (0)