=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/status.c,v retrieving revision 1.65 retrieving revision 1.66 diff -u -r1.65 -r1.66 --- src/usr.bin/tmux/status.c 2010/12/11 16:05:57 1.65 +++ src/usr.bin/tmux/status.c 2010/12/11 16:13:15 1.66 @@ -1,4 +1,4 @@ -/* $OpenBSD: status.c,v 1.65 2010/12/11 16:05:57 nicm Exp $ */ +/* $OpenBSD: status.c,v 1.66 2010/12/11 16:13:15 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -865,6 +865,7 @@ { struct paste_buffer *pb; char *s, *first, *last, word[64], swapc; + const char *histstr; u_char ch; size_t size, n, off, idx; @@ -977,20 +978,20 @@ } break; case MODEKEYEDIT_HISTORYUP: - s = status_prompt_up_history(&c->prompt_hindex); - if (s == NULL) + histstr = status_prompt_up_history(&c->prompt_hindex); + if (histstr == NULL) break; xfree(c->prompt_buffer); - c->prompt_buffer = xstrdup(s); + c->prompt_buffer = xstrdup(histstr); c->prompt_index = strlen(c->prompt_buffer); c->flags |= CLIENT_STATUS; break; case MODEKEYEDIT_HISTORYDOWN: - s = status_prompt_down_history(&c->prompt_hindex); - if (s == NULL) + histstr = status_prompt_down_history(&c->prompt_hindex); + if (histstr == NULL) break; xfree(c->prompt_buffer); - c->prompt_buffer = xstrdup(s); + c->prompt_buffer = xstrdup(histstr); c->prompt_index = strlen(c->prompt_buffer); c->flags |= CLIENT_STATUS; break;