CleverRaven/Cataclysm-DDA — pull request #6810 by BevapDin (2014-03-20 10:15:23+00:00)
Title: Fix scroll start pos

Fixes #6803

The option file is not relevant for this bug. Except maybe the MENU_SCROLL option, but I think it crashed for both values that this option can have.

Fixed a small visual glitch: When entering the mod manager screen, the active mods list can be changed without switching to it and it is not marked as the active list: the `>>` in front of the selected entries on both lists are blue.
You can switch the active list with the left/right arrow keys and the active list will display yellow `>>`.

----

Why is the return value of calcStartPos not returned with `return` but as reference parameter? That is very counterintuitive.

And there is another bug with that function:
If you go into the autopickup window and add entries (no text required, just press `a`) until the scrollbar appears and somemore. Now the display is scrolled to the bottom, and the last entries is selected. Press `r` to multiple times until the scrollbar disappears. The display does not scroll up, that is you end up with only one entry displayed, because the other remaining entries are still outside the visible area.

Fixed that, too.