1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Silly mistake - restore-cursor-pos doesn't make sure the cursor

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]
This commit is contained in:
Simon Tatham 2000-07-08 16:09:39 +00:00
parent e3e48f45c7
commit 81b923a824

View File

@ -495,6 +495,9 @@ static void save_cursor(int save) {
} 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;