[BACK]Return to status.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/status.c between version 1.75 and 1.76

version 1.75, 2011/04/29 07:07:31 version 1.76, 2011/07/02 21:05:44
Line 815 
Line 815 
   
 /* Enable status line prompt. */  /* Enable status line prompt. */
 void  void
 status_prompt_set(struct client *c, const char *msg,  status_prompt_set(struct client *c, const char *msg, const char *input,
     int (*callbackfn)(void *, const char *), void (*freefn)(void *),      int (*callbackfn)(void *, const char *), void (*freefn)(void *),
     void *data, int flags)      void *data, int flags)
 {  {
Line 826 
Line 826 
   
         c->prompt_string = xstrdup(msg);          c->prompt_string = xstrdup(msg);
   
         c->prompt_buffer = xstrdup("");          if (input != NULL)
         c->prompt_index = 0;                  c->prompt_buffer = xstrdup(input);
           else
                   c->prompt_buffer = xstrdup("");
           c->prompt_index = strlen(c->prompt_buffer);
   
         c->prompt_callbackfn = callbackfn;          c->prompt_callbackfn = callbackfn;
         c->prompt_freefn = freefn;          c->prompt_freefn = freefn;
Line 871 
Line 874 
   
 /* Update status line prompt with a new prompt string. */  /* Update status line prompt with a new prompt string. */
 void  void
 status_prompt_update(struct client *c, const char *msg)  status_prompt_update(struct client *c, const char *msg, const char *input)
 {  {
         xfree(c->prompt_string);          xfree(c->prompt_string);
         c->prompt_string = xstrdup(msg);          c->prompt_string = xstrdup(msg);
   
         *c->prompt_buffer = '\0';          xfree(c->prompt_buffer);
         c->prompt_index = 0;          if (input != NULL)
                   c->prompt_buffer = xstrdup(input);
           else
                   c->prompt_buffer = xstrdup("");
           c->prompt_index = strlen(c->prompt_buffer);
   
         c->prompt_hindex = 0;          c->prompt_hindex = 0;
   

Legend:
Removed from v.1.75  
changed lines
  Added in v.1.76