[gedit-plugins] synctex: call goto_line on an idle when doing sync_source on non-open file.
- From: Jose Aliste <jaliste src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-plugins] synctex: call goto_line on an idle when doing sync_source on non-open file.
- Date: Tue, 28 Jun 2011 19:07:26 +0000 (UTC)
commit e18cd9fafa3931431408975aaa858eae069b79b6
Author: Josà Aliste <jaliste src gnome org>
Date: Tue Jun 28 15:01:04 2011 -0400
synctex: call goto_line on an idle when doing sync_source on non-open file.
Doing the goto_line on the 'loaded' signal handler is not enough
and the scroll_to_cursor does not work, so we
install a call to goto_line on the idle instead to ensure scroll_to_cursor
does work.
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 c499512..a334782 100644
--- a/plugins/synctex/synctex/synctex.py
+++ b/plugins/synctex/synctex/synctex.py
@@ -191,7 +191,7 @@ class SynctexViewHelper:
self._window.present_with_time (time)
def goto_line_after_load(self, a, line, time):
- self.goto_line(line, time)
+ GObject.idle_add (lambda : self.goto_line(line, time))
self._doc.disconnect(self._goto_handler)
def sync_view(self, time):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]