Ignore:
Timestamp:
Apr 30, 2007, 1:16:42 AM (18 years ago)
Author:
bird
Message:

Applied bash31-014

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/essentials/app-shells/bash/lib/readline/display.c

    r3231 r3249  
    19841984{
    19851985  int len;
    1986   char *pmt;
     1986  char *pmt, *p;
    19871987
    19881988  rl_save_prompt ();
    19891989
    1990   if (saved_local_prompt == 0)
     1990  /* We've saved the prompt, and can do anything with the various prompt
     1991     strings we need before they're restored.  We want the unexpanded
     1992     portion of the prompt string after any final newline. */
     1993  p = rl_prompt ? strrchr (rl_prompt, '\n') : 0;
     1994  if (p == 0)
    19911995    {
    19921996      len = (rl_prompt && *rl_prompt) ? strlen (rl_prompt) : 0;
     
    19992003  else
    20002004    {
    2001       len = *saved_local_prompt ? strlen (saved_local_prompt) : 0;
     2005      p++;
     2006      len = strlen (p);
    20022007      pmt = (char *)xmalloc (len + 2);
    20032008      if (len)
    2004         strcpy (pmt, saved_local_prompt);
     2009        strcpy (pmt, p);
    20052010      pmt[len] = pchar;
    20062011      pmt[len+1] = '\0';
    2007       local_prompt = savestring (pmt);
    2008       prompt_last_invisible = saved_last_invisible;
    2009       prompt_visible_length = saved_visible_length + 1;
    2010     }
    2011 
     2012    } 
     2013
     2014  /* will be overwritten by expand_prompt, called from rl_message */
    20122015  prompt_physical_chars = saved_physical_chars + 1;
    2013 
    20142016  return pmt;
    20152017}
Note: See TracChangeset for help on using the changeset viewer.