mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-18 11:38:05 -05:00
The `wrapnext' flag should be saved and restored with the cursor
position. Failure to do this can give wrapnext==TRUE even with the cursor not in the rightmost column. [originally from svn r1572]
This commit is contained in:
parent
fdbd697801
commit
d21683f92c
10
terminal.c
10
terminal.c
@ -99,7 +99,7 @@ static int wrap, wrapnext; /* wrap flags */
|
|||||||
static int insert; /* insert-mode flag */
|
static int insert; /* insert-mode flag */
|
||||||
static int cset; /* 0 or 1: which char set */
|
static int cset; /* 0 or 1: which char set */
|
||||||
static int save_cset, save_csattr; /* saved with cursor position */
|
static int save_cset, save_csattr; /* saved with cursor position */
|
||||||
static int save_utf; /* saved with cursor position */
|
static int save_utf, save_wnext; /* saved with cursor position */
|
||||||
static int rvideo; /* global reverse video flag */
|
static int rvideo; /* global reverse video flag */
|
||||||
static unsigned long rvbell_startpoint;/* for ESC[?5hESC[?5l vbell */
|
static unsigned long rvbell_startpoint;/* for ESC[?5hESC[?5l vbell */
|
||||||
static int cursor_on; /* cursor enabled flag */
|
static int cursor_on; /* cursor enabled flag */
|
||||||
@ -746,6 +746,7 @@ static void save_cursor(int save)
|
|||||||
save_attr = curr_attr;
|
save_attr = curr_attr;
|
||||||
save_cset = cset;
|
save_cset = cset;
|
||||||
save_utf = utf;
|
save_utf = utf;
|
||||||
|
save_wnext = wrapnext;
|
||||||
save_csattr = cset_attr[cset];
|
save_csattr = cset_attr[cset];
|
||||||
save_sco_acs = sco_acs;
|
save_sco_acs = sco_acs;
|
||||||
} else {
|
} else {
|
||||||
@ -759,6 +760,13 @@ static void save_cursor(int save)
|
|||||||
curr_attr = save_attr;
|
curr_attr = save_attr;
|
||||||
cset = save_cset;
|
cset = save_cset;
|
||||||
utf = save_utf;
|
utf = save_utf;
|
||||||
|
wrapnext = save_wnext;
|
||||||
|
/*
|
||||||
|
* wrapnext might reset to False if the x position is no
|
||||||
|
* longer at the rightmost edge.
|
||||||
|
*/
|
||||||
|
if (wrapnext && curs.x < cols-1)
|
||||||
|
wrapnext = FALSE;
|
||||||
cset_attr[cset] = save_csattr;
|
cset_attr[cset] = save_csattr;
|
||||||
sco_acs = save_sco_acs;
|
sco_acs = save_sco_acs;
|
||||||
fix_cpos;
|
fix_cpos;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user