include -1 when cycling through popup items

This commit is contained in:
nightwing 2013-09-04 18:37:50 +04:00
commit 94e4c2d6dd

View file

@ -128,8 +128,8 @@ var Autocomplete = function() {
var max = this.popup.session.getLength() - 1;
switch(where) {
case "up": row = row <= 0 ? max : row - 1; break;
case "down": row = row >= max ? 0 : row + 1; break;
case "up": row = row < 0 ? max : row - 1; break;
case "down": row = row >= max ? -1 : row + 1; break;
case "start": row = 0; break;
case "end": row = max; break;
}