merged client_test change from libtorrent_aio

This commit is contained in:
Arvid Norberg 2012-10-07 20:08:47 +00:00
parent 0a6c1e05c2
commit d081842a31
1 changed files with 3 additions and 2 deletions

View File

@ -1952,9 +1952,10 @@ int main(int argc, char* argv[])
// handle scrolling down when moving the cursor
// below the fold
int start_offset = 0;
if (active_torrent >= max_lines - lines_printed)
static int start_offset = 0;
if (active_torrent >= max_lines - lines_printed - start_offset)
start_offset = active_torrent - max_lines + lines_printed + 1;
if (active_torrent < start_offset) start_offset = active_torrent;
for (std::vector<torrent_status const*>::iterator i = filtered_handles.begin();
i != filtered_handles.end(); ++torrent_index)