=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/status.c,v retrieving revision 1.76 retrieving revision 1.77 diff -c -r1.76 -r1.77 *** src/usr.bin/tmux/status.c 2011/07/02 21:05:44 1.76 --- src/usr.bin/tmux/status.c 2011/07/08 06:37:57 1.77 *************** *** 1,4 **** ! /* $OpenBSD: status.c,v 1.76 2011/07/02 21:05:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: status.c,v 1.77 2011/07/08 06:37:57 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 824,835 **** status_message_clear(c); status_prompt_clear(c); ! c->prompt_string = xstrdup(msg); ! if (input != NULL) ! c->prompt_buffer = xstrdup(input); ! else ! c->prompt_buffer = xstrdup(""); c->prompt_index = strlen(c->prompt_buffer); c->prompt_callbackfn = callbackfn; --- 824,836 ---- status_message_clear(c); status_prompt_clear(c); ! c->prompt_string = status_replace(c, NULL, NULL, NULL, msg, ! time(NULL), 0); ! if (input == NULL) ! input = ""; ! c->prompt_buffer = status_replace(c, NULL, NULL, NULL, input, ! time(NULL), 0); c->prompt_index = strlen(c->prompt_buffer); c->prompt_callbackfn = callbackfn; *************** *** 877,889 **** status_prompt_update(struct client *c, const char *msg, const char *input) { xfree(c->prompt_string); ! c->prompt_string = xstrdup(msg); xfree(c->prompt_buffer); ! if (input != NULL) ! c->prompt_buffer = xstrdup(input); ! else ! c->prompt_buffer = xstrdup(""); c->prompt_index = strlen(c->prompt_buffer); c->prompt_hindex = 0; --- 878,891 ---- status_prompt_update(struct client *c, const char *msg, const char *input) { xfree(c->prompt_string); ! c->prompt_string = status_replace(c, NULL, NULL, NULL, msg, ! time(NULL), 0); xfree(c->prompt_buffer); ! if (input == NULL) ! input = ""; ! c->prompt_buffer = status_replace(c, NULL, NULL, NULL, input, ! time(NULL), 0); c->prompt_index = strlen(c->prompt_buffer); c->prompt_hindex = 0;