mirror of
https://github.com/RustyRaptor/brackets.git
synced 2026-12-04 00:15:22 -07:00
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:
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;
|
||||
|
||||
Reference in new issue
Block a user