Skip to content
Snippets Groups Projects
Commit 7948d8cc authored by Marijn Haverbeke's avatar Marijn Haverbeke
Browse files

[util/simple-hint] Align completion dropdown with completed word

Add alignWithWord option to be able to turn that off.
parent 15d910af
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,7 @@
}
sel.firstChild.selected = true;
sel.size = Math.min(10, completions.length);
var pos = editor.cursorCoords();
var pos = editor.cursorCoords(options.alignWithWord ? result.from : null);
complete.style.left = pos.left + "px";
complete.style.top = pos.bottom + "px";
document.body.appendChild(complete);
......@@ -96,6 +96,7 @@
CodeMirror.simpleHint.defaults = {
closeOnBackspace: true,
closeOnTokenChange: false,
completeSingle: true
completeSingle: true,
alignWithWord: true
};
})();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment