autocomplete: fix not detecting correct tag in edit box.

This commit is contained in:
evazion
2020-12-17 23:57:13 -06:00
parent 2c1da660fd
commit 3d1ff9dff9
@@ -110,7 +110,7 @@ Autocomplete.initialize_tag_autocomplete = function() {
Autocomplete.current_term = function($input) {
let query = $input.get(0).value;
let caret = $input.get(0).selectionStart;
let match = query.substring(0, caret).match(/\S*/);
let match = query.substring(0, caret).match(/\S*$/);
return match[0];
};