Bug 319066 - Cope with the bogus selection range the tree will sometimes give us (-1 start).

ChatZilla only.
r=samuel
This commit is contained in:
silver%warwickcompsoc.co.uk 2005-12-07 14:51:26 +00:00
Родитель b79b7716b9
Коммит ca56ed31d3
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -1438,6 +1438,12 @@ function getSelectedNicknames(tree)
// If they == -1, we've got no selection, so bail.
if ((start.value == -1) && (end.value == -1))
continue;
/* Workaround: Because we use select(-1) instead of clearSelection()
* (see bug 197667) the tree will then give us selection ranges
* starting from -1 instead of 0! (See bug 319066.)
*/
if (start.value == -1)
start.value = 0;
// Loop through the contents of the current selection range.
for (var k = start.value; k <= end.value; ++k)