diff --git a/addon/hint/show-hint.js b/addon/hint/show-hint.js index 649d959e993c4fa29fd1875b8f486b0fba7b2fd1..a1e56c38bee9bc544e69dd74d0ff465e5095235a 100644 --- a/addon/hint/show-hint.js +++ b/addon/hint/show-hint.js @@ -25,7 +25,7 @@ }; CodeMirror.defineExtension("showHint", function(options) { - options = parseOptions(this, options); + options = parseOptions(this, this.getCursor("start"), options); var selections = this.listSelections() if (selections.length > 1) return; // By default, don't allow completion when something is selected. @@ -395,6 +395,8 @@ return function(cm) { return CodeMirror.hint.fromList(cm, {words: words}) } } else if (CodeMirror.hint.anyword) { return function(cm, options) { return CodeMirror.hint.anyword(cm, options) } + } else { + return function() {} } }