CleverRaven/Cataclysm-DDA — pull request #8133 by BevapDin (2014-07-04 19:47:16+00:00)
Title: Fix curseport bugs

About that "Too many items for professions" bug:

cursesport did not handle the newline (or any control character) correctly and the check for valid cursor position was to late. The cursesport should behave as much as ncurses as possible, if ncurses does not crash in that situation, so should cursesport.

Another thing: in `game::plmove` the string that informs about safe mode contains several (many) tabs and those tabs go into the output and disturb it. The cursesport could not handle that either. It is fixed now (tabs are removed from that string and cursesport can handle them if they appear somewhere).

Another thing: cata_tiles does not need to rebuild the map cache. This is already done in game::draw_ter, before the call to `wrefresh(w_terrain)`, which (in a SDL build with tiles) calls `cata_tiles::draw`.