projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stdout and stderr should be made O_NONBLOCK so that we don't end up blocking
[u/mdw/putty]
/
terminal.c
diff --git
a/terminal.c
b/terminal.c
index
0a03f3a
..
65efb8e
100644
(file)
--- a/
terminal.c
+++ b/
terminal.c
@@
-1722,7
+1722,7
@@
void term_provide_resize_fn(Terminal *term,
{
term->resize_fn = resize_fn;
term->resize_ctx = resize_ctx;
{
term->resize_fn = resize_fn;
term->resize_ctx = resize_ctx;
- if (term->cols > 0 && term->rows > 0)
+ if (
resize_fn &&
term->cols > 0 && term->rows > 0)
resize_fn(resize_ctx, term->cols, term->rows);
}
resize_fn(resize_ctx, term->cols, term->rows);
}
@@
-2850,6
+2850,13
@@
static void term_out(Terminal *term)
term->wrapnext = FALSE;
seen_disp_event(term);
term->paste_hold = 0;
term->wrapnext = FALSE;
seen_disp_event(term);
term->paste_hold = 0;
+
+ if (term->cfg.crhaslf) {
+ if (term->curs.y == term->marg_b)
+ scroll(term, term->marg_t, term->marg_b, 1, TRUE);
+ else if (term->curs.y < term->rows - 1)
+ term->curs.y++;
+ }
if (term->logctx)
logtraffic(term->logctx, (unsigned char) c, LGTYP_ASCII);
break;
if (term->logctx)
logtraffic(term->logctx, (unsigned char) c, LGTYP_ASCII);
break;
@@
-6398,6
+6405,7
@@
char *term_get_ttymode(Terminal *term, const char *mode)
val = term->cfg.bksp_is_delete ? "^?" : "^H";
}
/* FIXME: perhaps we should set ONLCR based on cfg.lfhascr as well? */
val = term->cfg.bksp_is_delete ? "^?" : "^H";
}
/* FIXME: perhaps we should set ONLCR based on cfg.lfhascr as well? */
+ /* FIXME: or ECHO and friends based on local echo state? */
return dupstr(val);
}
return dupstr(val);
}
@@
-6441,7
+6449,7
@@
int term_get_userpass_input(Terminal *term, prompts_t *p,
*/
{
int i;
*/
{
int i;
- for (i = 0; i < p->n_prompts; i++)
+ for (i = 0; i <
(int)
p->n_prompts; i++)
memset(p->prompts[i]->result, 0, p->prompts[i]->result_len);
}
}
memset(p->prompts[i]->result, 0, p->prompts[i]->result_len);
}
}