[sushi/wip/cosimoc/no-clutter: 36/66] text: don't hang on to the text loader



commit 47d41a48e9444ee26cb8e8784302b3fe5e342995
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Sat Apr 8 21:33:22 2017 -0700

    text: don't hang on to the text loader

 src/js/viewers/text.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/js/viewers/text.js b/src/js/viewers/text.js
index 95702e8..3f0ca2d 100644
--- a/src/js/viewers/text.js
+++ b/src/js/viewers/text.js
@@ -49,10 +49,10 @@ const TextRenderer = new Lang.Class({
         this._file = file;
         this._callback = callback;
 
-        this._textLoader = new Sushi.TextLoader();
-        this._textLoader.connect('loaded',
-                                 Lang.bind(this, this._onBufferLoaded));
-        this._textLoader.uri = file.get_uri();
+        let textLoader = new Sushi.TextLoader();
+        textLoader.connect('loaded',
+                           Lang.bind(this, this._onBufferLoaded));
+        textLoader.uri = file.get_uri();
 
         this._geditScheme = 'tango';
         let schemaName = 'org.gnome.gedit.preferences.editor';


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]