Merge pull request #2630 from thelounge/xpaw/autocompl-bugs

Fix disabling autocomplete and fix completing special channels
This commit is contained in:
Pavel Djundik 2018-07-08 21:58:33 +03:00 committed by GitHub
commit d41ca1a1f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,7 @@ module.exports = {
disable() {
if (enabled) {
input.off("input.tabcomplete");
Mousetrap(input.get(0)).off("tab", "keydown");
Mousetrap(input.get(0)).unbind("tab", "keydown");
textcomplete.destroy();
enabled = false;
}
@ -318,7 +318,7 @@ function completeChans(word) {
.each(function() {
const self = $(this);
if (!self.hasClass("lobby")) {
if (self.hasClass("channel")) {
words.push(self.attr("aria-label"));
}
});