[gedit-plugins] synctex: move update after save to an idle
- From: Jose Aliste <jaliste src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-plugins] synctex: move update after save to an idle
- Date: Sat, 8 Nov 2014 18:39:19 +0000 (UTC)
commit b279c0f7d8df4abb716cd0ef2ccac8ba3cee0b6a
Author: José Aliste <jaliste src gnome org>
Date: Sat Nov 8 15:36:00 2014 -0300
synctex: move update after save to an idle
in gedit 3.14, after loading or saving a file, the get_language()
method can return None (that is the language was not yet init)
Solve it by moving the update function to an idle.
plugins/synctex/synctex/synctex.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/synctex/synctex/synctex.py b/plugins/synctex/synctex/synctex.py
index 490baae..8779f2f 100644
--- a/plugins/synctex/synctex/synctex.py
+++ b/plugins/synctex/synctex/synctex.py
@@ -97,7 +97,7 @@ class SynctexViewHelper:
self.sync_view(event.time)
def on_saved_or_loaded(self, doc):
- self.update_location()
+ GObject.idle_add(self.update_location)
def get_output_file(self):
file_output = None
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]