1
0
mirror of https://github.com/hack-chat/main.git synced 2024-03-22 13:20:33 +08:00

Make autocomplete with multiple unused results not insert tab

This commit is contained in:
MinusGix 2019-04-12 18:55:35 -05:00 committed by GitHub
parent febc9ba744
commit 1399400c39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -411,9 +411,11 @@ $('#chatinput').onkeydown = function (e) {
return nick.toLowerCase().indexOf(stub) == 0
});
if (nicks.length == 1) {
insertAtCursor(nicks[0].substr(stub.length) + " ");
if (nicks.length > 0) {
autocompletedNick = true;
if (nicks.length == 1) {
insertAtCursor(nicks[0].substr(stub.length) + " ");
}
}
}