mirror of https://github.com/calzoneman/sync.git
Minor tweak to tab complete
This commit is contained in:
parent
2c6edb38b8
commit
9562bc3757
|
@ -139,13 +139,15 @@ function chatTabComplete() {
|
||||||
var first = users[0];
|
var first = users[0];
|
||||||
for (var i = 1; i < users.length; i++) {
|
for (var i = 1; i < users.length; i++) {
|
||||||
if (users[i] !== first) {
|
if (users[i] !== first) {
|
||||||
users[i] = users[i].substring(0, users[i].length - 1);
|
|
||||||
changed = true;
|
changed = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (changed) {
|
if (changed) {
|
||||||
users[0] = users[0].substring(0, users[0].length - 1);
|
users = users.map(function (name) {
|
||||||
|
return name.substring(0, name.length - 1);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// In the event something above doesn't generate a break condition, limit
|
// In the event something above doesn't generate a break condition, limit
|
||||||
|
|
Loading…
Reference in New Issue