diff --git a/ChangeLog b/ChangeLog
index 3720668fa747cd0adb87e3c451ce6bed2f44c8d5..e7bfc4afa3d8e2d6802f63ffdabbc2e218a4b9f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,10 @@ CVS code -
 	- When constant cursor position display is on, only display the
 	  cursor position if there are no keys waiting in the buffer.
 	  (DLR)
+- search.c:
+  do_replace()
+	- Blank out last_replace properly again just before displaying
+	  the "Replace" prompt. (DLR, found by Mike Frysinger)
 
 GNU nano 1.3.8 - 2005.06.30
 - General:
diff --git a/src/search.c b/src/search.c
index c1975a617520e1c39a408e3f97c6e9d130f0331f..6687975d12969354711dd68d792d010345fd166d 100644
--- a/src/search.c
+++ b/src/search.c
@@ -907,6 +907,8 @@ void do_replace(void)
 	last_search = mallocstrcpy(last_search, answer);
     }
 
+    last_replace = mallocstrcpy(last_replace, "");
+
     i = statusq(FALSE, replace_list_2, last_replace,
 #ifndef NANO_SMALL
 	&replace_history,