position is inside the screen (it might not be if the screen has
shrunk since the save of cursor position). Thanks to Robert de Bath.
[originally from svn r512]
} else {
curs_x = save_x;
curs_y = save_y;
} else {
curs_x = save_x;
curs_y = save_y;
+ /* Make sure the window hasn't shrunk since the save */
+ if (curs_x >= cols) curs_x = cols-1;
+ if (curs_y >= rows) curs_y = rows-1;
curr_attr = save_attr;
cset = save_cset;
cset_attr[cset] = save_csattr;
curr_attr = save_attr;
cset = save_cset;
cset_attr[cset] = save_csattr;