mirror of
https://github.com/hack-chat/main.git
synced 2024-03-22 13:20:33 +08:00
Merge pull request #59 from MinusGix/patch-4
Make autocomplete with multiple unused results not insert tab
This commit is contained in:
commit
75e7e56309
|
@ -410,10 +410,12 @@ $('#chatinput').onkeydown = function (e) {
|
|||
var nicks = onlineUsers.filter(function (nick) {
|
||||
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) + " ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user