Index: BOOK/final-system/common/readline.xml
===================================================================
--- BOOK/final-system/common/readline.xml	(revision 8ec404e68237d6c3e6dd75ad5847eb14a8c5b8c2)
+++ BOOK/final-system/common/readline.xml	(revision 613a3269177069f03ee5a9cd222f3e4242e0b5dd)
@@ -26,10 +26,8 @@
     <title>Installation of Readline</title>
 
-<!--
     <para os="p1">The following patch contains updates from the maintainer. The
     maintainer of Readline only releases these patches to fix serious issues:</para>
 
 <screen os="p2"><userinput>patch -Np1 -i ../&readline-branch_update-patch;</userinput></screen>
--->
 
     <para os="s1">This option forces Readline to link against the
Index: BOOK/final-system/multilib/readline-64bit.xml
===================================================================
--- BOOK/final-system/multilib/readline-64bit.xml	(revision 8ec404e68237d6c3e6dd75ad5847eb14a8c5b8c2)
+++ BOOK/final-system/multilib/readline-64bit.xml	(revision 613a3269177069f03ee5a9cd222f3e4242e0b5dd)
@@ -22,5 +22,4 @@
     <title>Installation of Readline</title>
 
-<!--
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="readline.xml"
@@ -30,5 +29,4 @@
     href="readline.xml"
     xpointer="xpointer(//*[@os='p2'])"/>
--->
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
Index: BOOK/final-system/multilib/readline-n32.xml
===================================================================
--- BOOK/final-system/multilib/readline-n32.xml	(revision 8ec404e68237d6c3e6dd75ad5847eb14a8c5b8c2)
+++ BOOK/final-system/multilib/readline-n32.xml	(revision 613a3269177069f03ee5a9cd222f3e4242e0b5dd)
@@ -23,5 +23,4 @@
     <title>Installation of Readline</title>
 
-<!--
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="readline.xml"
@@ -31,5 +30,4 @@
     href="readline.xml"
     xpointer="xpointer(//*[@os='p2'])"/>
--->
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
Index: BOOK/final-system/multilib/readline.xml
===================================================================
--- BOOK/final-system/multilib/readline.xml	(revision 8ec404e68237d6c3e6dd75ad5847eb14a8c5b8c2)
+++ BOOK/final-system/multilib/readline.xml	(revision 613a3269177069f03ee5a9cd222f3e4242e0b5dd)
@@ -23,5 +23,4 @@
     <title>Installation of Readline</title>
 
-<!--
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="../common/readline.xml"
@@ -31,5 +30,4 @@
     href="../common/readline.xml"
     xpointer="xpointer(//*[@os='p2'])"/>
--->
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
Index: BOOK/introduction/common/changelog.xml
===================================================================
--- BOOK/introduction/common/changelog.xml	(revision 8ec404e68237d6c3e6dd75ad5847eb14a8c5b8c2)
+++ BOOK/introduction/common/changelog.xml	(revision 613a3269177069f03ee5a9cd222f3e4242e0b5dd)
@@ -50,4 +50,7 @@
         </listitem>
       </itemizedlist>
+        <listitem>
+          <para>[Jim] - Added Readline Branch Update Patch.</para>
+        </listitem>
     </listitem>
 
Index: BOOK/materials/common/patches.xml
===================================================================
--- BOOK/materials/common/patches.xml	(revision 8ec404e68237d6c3e6dd75ad5847eb14a8c5b8c2)
+++ BOOK/materials/common/patches.xml	(revision 613a3269177069f03ee5a9cd222f3e4242e0b5dd)
@@ -201,5 +201,4 @@
     </varlistentry>
 
-<!--
     <varlistentry>
       <term>Readline Branch Update - <token>&readline-branch_update-patch-size;</token>:</term>
@@ -210,5 +209,4 @@
       </listitem>
     </varlistentry>
--->
 
     <varlistentry>
Index: BOOK/patches.ent
===================================================================
--- BOOK/patches.ent	(revision 8ec404e68237d6c3e6dd75ad5847eb14a8c5b8c2)
+++ BOOK/patches.ent	(revision 613a3269177069f03ee5a9cd222f3e4242e0b5dd)
@@ -90,6 +90,6 @@
 
 <!ENTITY readline-branch_update-patch "readline-&readline-version;-branch_update-1.patch">
-<!ENTITY readline-branch_update-patch-md5 "">
-<!ENTITY readline-branch_update-patch-size " KB">
+<!ENTITY readline-branch_update-patch-md5 "1113f58c09eebb9839c5fc4d692416d9">
+<!ENTITY readline-branch_update-patch-size "3 KB">
 
 <!ENTITY sysvinit-fixes-patch "sysvinit-&sysvinit-version;-fixes-1.patch">
Index: patches/readline-6.0-branch_update-1.patch
===================================================================
--- patches/readline-6.0-branch_update-1.patch	(revision 613a3269177069f03ee5a9cd222f3e4242e0b5dd)
+++ patches/readline-6.0-branch_update-1.patch	(revision 613a3269177069f03ee5a9cd222f3e4242e0b5dd)
@@ -0,0 +1,92 @@
+Submitted By: Jim Gifford (jim at cross-lfs dot org)
+Date: 06-05-2009
+Initial Package Version: 6.0
+Origin: Upstream
+Upstream Status: Applied
+Description: Contains all upstream patches up to 6.0-003
+
+diff -Naur readline-6.0.orig/display.c readline-6.0/display.c
+--- readline-6.0.orig/display.c	2009-01-04 11:32:32.000000000 -0800
++++ readline-6.0/display.c	2009-06-05 14:07:00.000000000 -0700
+@@ -512,6 +512,7 @@
+   /* Block keyboard interrupts because this function manipulates global
+      data structures. */
+   _rl_block_sigint ();  
++  RL_SETSTATE (RL_STATE_REDISPLAYING);
+ 
+   if (!rl_display_prompt)
+     rl_display_prompt = "";
+@@ -1236,6 +1237,7 @@
+       visible_wrap_offset = wrap_offset;
+   }
+ 
++  RL_UNSETSTATE (RL_STATE_REDISPLAYING);
+   _rl_release_sigint ();
+ }
+ 
+@@ -1772,7 +1774,7 @@
+ 	     space_to_eol will insert too many spaces.  XXX - maybe we should
+ 	     adjust col_lendiff based on the difference between _rl_last_c_pos
+ 	     and _rl_screenwidth */
+-	  if (col_lendiff && (_rl_last_c_pos < _rl_screenwidth))
++	  if (col_lendiff && ((MB_CUR_MAX == 1 || rl_byte_oriented) || (_rl_last_c_pos < _rl_screenwidth)))
+ #endif
+ 	    {	  
+ 	      if (_rl_term_autowrap && current_line < inv_botlin)
+@@ -1892,6 +1894,10 @@
+ 
+   woff = WRAP_OFFSET (_rl_last_v_pos, wrap_offset);
+   cpos = _rl_last_c_pos;
++
++  if (cpos == 0 && cpos == new)
++    return;
++
+ #if defined (HANDLE_MULTIBYTE)
+   /* If we have multibyte characters, NEW is indexed by the buffer point in
+      a multibyte string, but _rl_last_c_pos is the display position.  In
+@@ -1905,9 +1911,9 @@
+ 	 prompt string, since they're both buffer indices and DPOS is a
+ 	 desired display position. */
+       if ((new > prompt_last_invisible) ||		/* XXX - don't use woff here */
+-	  (prompt_physical_chars > _rl_screenwidth &&
++	  (prompt_physical_chars >= _rl_screenwidth &&
+ 	   _rl_last_v_pos == prompt_last_screen_line &&
+-	   wrap_offset >= woff &&
++	   wrap_offset >= woff && dpos >= woff &&
+ 	   new > (prompt_last_invisible-(_rl_screenwidth*_rl_last_v_pos)-wrap_offset)))
+ 	   /* XXX last comparison might need to be >= */
+ 	{
+diff -Naur readline-6.0.orig/patchlevel readline-6.0/patchlevel
+--- readline-6.0.orig/patchlevel	2008-11-18 08:01:14.000000000 -0800
++++ readline-6.0/patchlevel	2009-06-05 14:07:00.000000000 -0700
+@@ -1,3 +1,3 @@
+ # Do not edit -- exists only for use by patch
+ 
+-0
++3
+diff -Naur readline-6.0.orig/readline.h readline-6.0/readline.h
+--- readline-6.0.orig/readline.h	2009-01-04 11:32:33.000000000 -0800
++++ readline-6.0/readline.h	2009-06-05 14:06:57.000000000 -0700
+@@ -814,8 +814,9 @@
+ #define RL_STATE_VIMOTION	0x100000	/* reading vi motion arg */
+ #define RL_STATE_MULTIKEY	0x200000	/* reading multiple-key command */
+ #define RL_STATE_VICMDONCE	0x400000	/* entered vi command mode at least once */
++#define RL_STATE_REDISPLAYING	0x800000	/* updating terminal display */
+ 
+-#define RL_STATE_DONE		0x800000	/* done; accepted line */
++#define RL_STATE_DONE		0x1000000	/* done; accepted line */
+ 
+ #define RL_SETSTATE(x)		(rl_readline_state |= (x))
+ #define RL_UNSETSTATE(x)	(rl_readline_state &= ~(x))
+diff -Naur readline-6.0.orig/terminal.c readline-6.0/terminal.c
+--- readline-6.0.orig/terminal.c	2009-01-04 11:32:34.000000000 -0800
++++ readline-6.0/terminal.c	2009-06-05 14:06:57.000000000 -0700
+@@ -355,7 +355,7 @@
+       _rl_get_screen_size (fileno (rl_instream), 1);
+       if (CUSTOM_REDISPLAY_FUNC ())
+ 	rl_forced_update_display ();
+-      else
++      else if (RL_ISSTATE(RL_STATE_REDISPLAYING) == 0)
+ 	_rl_redisplay_after_sigwinch ();
+     }
+ }
