diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-24 15:29:29 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-24 15:29:29 +0000 |
commit | ebeb14211d978d6dfdf7d49bc4de8ce23acb8698 (patch) | |
tree | 466bed2a90b5c7decdafc0922a875eee07e1578a /window.c | |
parent | e21587864a050bd8dcfe4621237c89bbeb6b09f5 (diff) |
Handle DSR for resize(1).
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 28 |
1 files changed, 5 insertions, 23 deletions
@@ -1,4 +1,4 @@ -/* $Id: window.c,v 1.22 2007-10-24 11:30:02 nicm Exp $ */ +/* $Id: window.c,v 1.23 2007-10-24 15:29:29 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -101,7 +101,7 @@ window_create( w->in = buffer_create(BUFSIZ); w->out = buffer_create(BUFSIZ); screen_create(&w->screen, sx, sy); - input_init(&w->ictx, &w->screen); + input_init(w); if (name == NULL) { /* XXX */ @@ -182,7 +182,7 @@ window_destroy(struct window *w) { close(w->fd); - input_free(&w->ictx); + input_free(w); screen_destroy(&w->screen); @@ -303,27 +303,9 @@ window_key(struct window *w, int key) input_translate_key(w->out, key); } -/* - * Process window output. Output is translated into a series of escape - * sequences and strings and returned. - */ +/* Process output data from child process. */ void window_data(struct window *w, struct buffer *b) { - FILE *f; - - if (BUFFER_USED(w->in) == 0) - return; - - if (debug_level > 2) { - f = fopen("tmux-in.log", "a+"); - fwrite(BUFFER_OUT(w->in), BUFFER_USED(w->in), 1, f); - fclose(f); - } - - input_parse(&w->ictx, BUFFER_OUT(w->in), BUFFER_USED(w->in), b); - buffer_remove(w->in, BUFFER_USED(w->in)); - - if (INPUT_FLAGS(&w->ictx) & INPUT_BELL) - w->flags |= WINDOW_BELL; + input_parse(w, b); } |