File bash-2.05b-display-mbspeed.patch of Package compat-readline4

--- lib/readline/display.c	2002-06-04 23:54:47.000000000 +0900
+++ lib/readline/display.c	2002-12-12 16:31:06.000000000 +0900
@@ -1129,16 +1129,24 @@
       memset (&ps_new, 0, sizeof(mbstate_t));
       memset (&ps_old, 0, sizeof(mbstate_t));
 
-      new_offset = old_offset = 0;
-      for (ofd = old, nfd = new;
-	   (ofd - old < omax) && *ofd &&
-	     _rl_compare_chars(old, old_offset, &ps_old, new, new_offset, &ps_new); )
-	{
-	  old_offset = _rl_find_next_mbchar (old, old_offset, 1, MB_FIND_ANY);
-	  new_offset = _rl_find_next_mbchar (new, new_offset, 1, MB_FIND_ANY);
-	  ofd = old + old_offset;
-	  nfd = new + new_offset;
-	}
+      if(omax == nmax && strncmp(new,old,omax) == 0)
+        {
+          ofd = old + omax;
+          nfd = new + nmax;
+        }
+      else
+        {
+          new_offset = old_offset = 0;
+          for (ofd = old, nfd = new;
+               (ofd - old < omax) && *ofd &&
+                 _rl_compare_chars(old, old_offset, &ps_old, new, new_offset, &ps_new); )
+            {
+              old_offset = _rl_find_next_mbchar (old, old_offset, 1, MB_FIND_ANY);
+              new_offset = _rl_find_next_mbchar (new, new_offset, 1, MB_FIND_ANY);
+              ofd = old + old_offset;
+              nfd = new + new_offset;
+            }
+        }
     }
   else
 #endif
@@ -1169,8 +1177,9 @@
 	  memset (&ps_old, 0, sizeof (mbstate_t));
 	  memset (&ps_new, 0, sizeof (mbstate_t));
 
-	  _rl_adjust_point (old, ols - old, &ps_old);
-	  _rl_adjust_point (new, nls - new, &ps_new);
+          /* these doesn't make sense */
+	  /* _rl_adjust_point (old, ols - old, &ps_old); */
+          /* _rl_adjust_point (new, nls - new, &ps_new); */
 
 	  if (_rl_compare_chars (old, ols - old, &ps_old, new, nls - new, &ps_new) == 0)
 	    break;