]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Robert de Bath's implementation of ESC [ Z (backtab)
authorSimon Tatham <anakin@pobox.com>
Sat, 23 Jun 2001 16:59:00 +0000 (16:59 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 23 Jun 2001 16:59:00 +0000 (16:59 +0000)
[originally from svn r1155]

terminal.c

index 69713680b932943ef92c00343cb85515fe4232eb..f0dc9b11ea94e0066b7a1783e2fab973aa932b01 100644 (file)
@@ -1949,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);