Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ var destroyCompleter = function(e, editor) {
* There is an autocompletion popup, an optional inline ghost text renderer and a docuent tooltip popup inside.
*/
class Autocomplete {
constructor() {
constructor(editor) {
this.autoInsert = false;
this.autoSelect = true;
this.autoShown = false;
this.exactMatch = false;
this.exactMatch = (editor && editor.getOption('exactMatch')) || false;
this.inlineEnabled = false;
this.keyboardHandler = new HashHandler();
this.keyboardHandler.bindKeys(this.commands);
Expand Down Expand Up @@ -531,7 +531,7 @@ Autocomplete.for = function(editor) {
Autocomplete.$sharedInstance = new Autocomplete();
editor.completer = Autocomplete.$sharedInstance;
} else {
editor.completer = new Autocomplete();
editor.completer = new Autocomplete(editor);
editor.once("destroy", destroyCompleter);
}
return editor.completer;
Expand Down
3 changes: 2 additions & 1 deletion src/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -2994,7 +2994,8 @@ config.defineOptions(Editor.prototype, "editor", {
wrap: "session",
indentedSoftWrap: "session",
foldStyle: "session",
mode: "session"
mode: "session",
exactMatch: {initialValue: false}
});


Expand Down