Bladeren bron

Fix error with autocomplete.

Now that CodeMirror is obtained by 'self codeMirror',
self must have correct value, so callback needed .bind call.
Herbert Vojčík 10 jaren geleden
bovenliggende
commit
ee82482da1
2 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. 2 2
      src/Helios-Workspace.js
  2. 1 1
      src/Helios-Workspace.st

+ 2 - 2
src/Helios-Workspace.js

@@ -1885,7 +1885,7 @@ return $core.withContext(function($ctx1) {
 		var codeMirror = self._codeMirror();
 		codeMirror.keyMap.default.fallthrough = ["basic"];
 		codeMirror.commands.autocomplete = function(cm) {
-			codeMirror.showHint(cm, self._hintFor_options_);
+			codeMirror.showHint(cm, self._hintFor_options_.bind(self));
 		}
 	;
 return self;
@@ -1895,7 +1895,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "setupCodeMirror\x0a\x09<\x0a\x09\x09var codeMirror = self._codeMirror();\x0a\x09\x09codeMirror.keyMap.default.fallthrough = [\x22basic\x22];\x0a\x09\x09codeMirror.commands.autocomplete = function(cm) {\x0a\x09\x09\x09codeMirror.showHint(cm, self._hintFor_options_);\x0a\x09\x09}\x0a\x09>",
+source: "setupCodeMirror\x0a\x09<\x0a\x09\x09var codeMirror = self._codeMirror();\x0a\x09\x09codeMirror.keyMap.default.fallthrough = [\x22basic\x22];\x0a\x09\x09codeMirror.commands.autocomplete = function(cm) {\x0a\x09\x09\x09codeMirror.showHint(cm, self._hintFor_options_.bind(self));\x0a\x09\x09}\x0a\x09>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []

+ 1 - 1
src/Helios-Workspace.st

@@ -473,7 +473,7 @@ setupCodeMirror
 		var codeMirror = self._codeMirror();
 		codeMirror.keyMap.default.fallthrough = ["basic"];
 		codeMirror.commands.autocomplete = function(cm) {
-			codeMirror.showHint(cm, self._hintFor_options_);
+			codeMirror.showHint(cm, self._hintFor_options_.bind(self));
 		}
 	>
 !