Hack yet another place where we need to use _codeMirror.replaceRange() in code hints to make them work in inline editors because of #1688.

This commit is contained in:
Narciso Jaramillo committed 2013-05-03 10:30:35 -07:00
1 parent c3b8fd34e8
commit 984ed97ddd
1 file changed
+5 -1
@@ -411,7 +411,11 @@ define(function (require, exports, module) {
}
}
// Replace the current token with the completion
session.editor.document.replaceRange(completion, start, end);
// HACK (tracking adobe/brackets#1688): We talk to the private CodeMirror instance
// directly to replace the range instead of using the Document, as we should. The
// reason is due to a flaw in our current document synchronization architecture when
// inline editors are open.
session.editor._codeMirror.replaceRange(completion, start, end);
// Return false to indicate that another hinting session is not needed
return false;