X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/8f22582cf466052917dad28301545cfa60db76e8..6edd7346879373ad77b27867587b0421fd82fc13:/terminal.c diff --git a/terminal.c b/terminal.c index aeadc771..f0dc9b11 100644 --- a/terminal.c +++ b/terminal.c @@ -254,6 +254,7 @@ unsigned long *lineptr(int y, int lineno) if (newline != line) { delpos234(whichtree, treeindex); addpos234(whichtree, newline, treeindex); + line = newline; } return line + 1; @@ -1948,6 +1949,21 @@ void term_out(void) } } break; + case 'Z': /* BackTab for xterm */ + compatibility(OTHER); + { + int i = def(esc_args[0], 1); + pos old_curs = curs; + + for(;i>0 && curs.x>0; i--) { + do { + curs.x--; + } while (curs.x >0 && !tabs[curs.x]); + } + fix_cpos; + check_selection(old_curs, curs); + } + break; case ANSI('L', '='): compatibility(OTHER); use_bce = (esc_args[0] <= 0);