diff --git a/app/assets/javascripts/discourse/components/autocomplete.js b/app/assets/javascripts/discourse/components/autocomplete.js index 10a5f2d0f5f..b46aff2fa6c 100644 --- a/app/assets/javascripts/discourse/components/autocomplete.js +++ b/app/assets/javascripts/discourse/components/autocomplete.js @@ -342,12 +342,13 @@ $.fn.autocomplete = function(options) { } else if (e.which === 187) { term += "+"; } else if (e.which === 189) { - term += "-"; + term += (e.shiftKey) ? "_" : "-"; } else { if (e.which !== 8) { term += ","; } } + options.dataSource(term).then(updateAutoComplete); return true; }