diff --git a/putty.h b/putty.h index 83d4932d..b6b8518f 100644 --- a/putty.h +++ b/putty.h @@ -215,7 +215,7 @@ extern const int colour_indices_oscp_to_osc4[OSCP_NCOLOURS]; #define DATTR_STARTRUN 0x80000000UL /* start of redraw run */ -#define TDATTR_MASK 0xF0000000UL +#define TDATTR_MASK 0x80000000UL #define TATTR_MASK (TDATTR_MASK) #define DATTR_MASK (TDATTR_MASK) diff --git a/terminal/terminal.c b/terminal/terminal.c index 898b642e..23b9a970 100644 --- a/terminal/terminal.c +++ b/terminal/terminal.c @@ -2066,7 +2066,6 @@ Terminal *term_init(Conf *myconf, struct unicode_data *ucsdata, TermWin *win) term_copy_stuff_from_conf(term); - term->dispcursx = term->dispcursy = -1; deselect(term); term->rows = term->cols = -1; power_on(term, true); @@ -2297,7 +2296,6 @@ void term_size(Terminal *term, int newrows, int newcols, int newsavelines) } sfree(term->disptext); term->disptext = newdisp; - term->dispcursx = term->dispcursy = -1; /* Make a new alternate screen. */ newalt = newtree234(NULL); @@ -6092,27 +6090,6 @@ static void do_paint(Terminal *term) unlineptr(ldata); } - /* - * If the cursor is not where it was last time we painted, and - * its previous position is visible on screen, invalidate its - * previous position. - */ - if (term->dispcursy >= 0 && - (term->curstype != cursor || - term->dispcursy != our_curs_y || - term->dispcursx != our_curs_x)) { - termchar *dispcurs = term->disptext[term->dispcursy]->chars + - term->dispcursx; - - if (term->dispcursx > 0 && dispcurs->chr == UCSWIDE) - dispcurs[-1].attr |= ATTR_INVALID; - if (term->dispcursx < term->cols-1 && dispcurs[1].chr == UCSWIDE) - dispcurs[1].attr |= ATTR_INVALID; - dispcurs->attr |= ATTR_INVALID; - - term->curstype = 0; - } - term->dispcursx = term->dispcursy = -1; /* The normal screen data */ for (i = 0; i < term->rows; i++) { @@ -6220,12 +6197,8 @@ static void do_paint(Terminal *term) } else if (term->disptext[i]->chars[j].attr & ATTR_NARROW) tattr |= ATTR_NARROW; - if (i == our_curs_y && j == our_curs_x) { + if (i == our_curs_y && j == our_curs_x) tattr |= cursor; - term->curstype = cursor; - term->dispcursx = j; - term->dispcursy = i; - } /* FULL-TERMCHAR */ newline[j].attr = tattr; diff --git a/terminal/terminal.h b/terminal/terminal.h index 02967274..df6ba4cc 100644 --- a/terminal/terminal.h +++ b/terminal/terminal.h @@ -95,8 +95,6 @@ struct terminal_tag { ("temporary scrollback") */ termline **disptext; /* buffer of text on real screen */ - int dispcursx, dispcursy; /* location of cursor on real screen */ - int curstype; /* type of cursor on real screen */ #define VBELL_TIMEOUT (TICKSPERSEC/10) /* visual bell lasts 1/10 sec */