codemirror 3, thnaks Roberto Perdomo and Mariano Reingart
This commit is contained in:
@@ -12,13 +12,7 @@
|
||||
cm.setCursor(cursor);
|
||||
}
|
||||
|
||||
// dirty hack for simple-hint to receive getHint event on space
|
||||
var getTokenAt = editor.getTokenAt;
|
||||
|
||||
editor.getTokenAt = function() { return 'disabled'; };
|
||||
CodeMirror.simpleHint(cm, getHint);
|
||||
|
||||
editor.getTokenAt = getTokenAt;
|
||||
};
|
||||
|
||||
var getHint = function(cm) {
|
||||
@@ -42,7 +36,7 @@
|
||||
|
||||
text = text.slice(0, text.length - typed.length);
|
||||
|
||||
var path = getActiveElement(cm, text) + simbol;
|
||||
var path = getActiveElement(text) + simbol;
|
||||
var hints = CodeMirror.xmlHints[path];
|
||||
|
||||
if(typeof hints === 'undefined')
|
||||
@@ -63,7 +57,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
var getActiveElement = function(codeMirror, text) {
|
||||
var getActiveElement = function(text) {
|
||||
|
||||
var element = '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user