Add SSH don't-allocate-pty option, and corresponding LF-implies-CR
[sgt/putty] / terminal.c
index feec70a..b41eacd 100644 (file)
@@ -628,6 +628,8 @@ void term_out(void) {
                    scroll (marg_t, marg_b, 1, TRUE);
                else if (curs_y < rows-1)
                    curs_y++;
+                if (cfg.lfhascr)
+                    curs_x = 0;
                fix_cpos;
                wrapnext = FALSE;
                disptop = scrtop;
@@ -1254,8 +1256,8 @@ void term_paint (Context ctx, int l, int t, int r, int b) {
     right = (r - 1) / font_width;
     top = t / font_height;
     bottom = (b - 1) / font_height;
-    for (i = top; i <= bottom && j<rows ; i++)
-      for (j = left; j <= right && j<cols ; j++)
+    for (i = top; i <= bottom && i < rows ; i++)
+      for (j = left; j <= right && j < cols ; j++)
            disptext[i*(cols+1)+j] = ATTR_INVALID;
 
     do_paint (ctx, FALSE);