diff --git a/ChangeLog b/ChangeLog
index 3160a5c6c8e22bb058d6fabfc0bb59e3e0312405..c9719a9ad4fac8ffcf0492a22e89bab4ceeeccf7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -161,6 +161,9 @@ CVS code -
 	- Refresh the screen when Ctrl-L is pressed at the statusbar
 	  prompt, as Pico does. (DLR)
 	- Always return the key pressed by the user. (DLR)
+	- Take new parameter reset_x, containing the value of
+	  resetstatuspos, so that resetstatuspos can be a static
+	  variable for just statusq(). (DLR)
   statusq()
 	- Rework slightly to reset the cursor position when the user
 	  hits Enter as well as Cancel.  This means that resetstatuspos
diff --git a/src/proto.h b/src/proto.h
index d2e623e7e8d74f3e3f87f29d06e4ffd140e08f13..c94077e409baf2d541d0d5535f5ac466acab850e 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -555,7 +555,7 @@ int nanogetstr(int allowtabs, const char *buf, const char *def,
 #ifndef NANO_SMALL
 		historyheadtype *history_list,
 #endif
-		const shortcut *s
+		const shortcut *s, bool reset_x
 #ifndef DISABLE_TABCOMP
 		, bool *list
 #endif
diff --git a/src/winio.c b/src/winio.c
index fd76353a0907204034dd32d1d8bd2751325e5b42..9823433b3ad99511f8f2310b04b43987de4299e0 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -33,9 +33,6 @@
 static int statusblank = 0;	/* Number of keystrokes left after
 				 * we call statusbar(), before we
 				 * actually blank the statusbar. */
-static bool resetstatuspos = FALSE;
-				/* Should we reset the statusbar cursor
-				 * position? */
 
 /* Control character compatibility:
  *
@@ -1762,7 +1759,7 @@ int nanogetstr(int allowtabs, const char *buf, const char *def,
 #ifndef NANO_SMALL
 		historyheadtype *history_list,
 #endif
-		const shortcut *s
+		const shortcut *s, bool reset_x
 #ifndef DISABLE_TABCOMP
 		, bool *list
 #endif
@@ -1795,11 +1792,12 @@ int nanogetstr(int allowtabs, const char *buf, const char *def,
 #endif
     xend = strlen(def);
 
-    /* Only put x at the end of the string if it's uninitialized or if
-       it would be past the end of the string as it is.  Otherwise,
-       leave it alone.  This is so the cursor position stays at the same
-       place if a prompt-changing toggle is pressed. */
-    if (x == -1 || x > xend || resetstatuspos)
+    /* Only put x at the end of the string if it's uninitialized, if it
+       would be past the end of the string as it is, or if reset_x is
+       TRUE.  Otherwise, leave it alone.  This is so the cursor position
+       stays at the same place if a prompt-changing toggle is
+       pressed. */
+    if (x == -1 || x > xend || reset_x)
 	x = xend;
 
     answer = charealloc(answer, xend + 1);
@@ -2989,6 +2987,7 @@ int statusq(int allowtabs, const shortcut *s, const char *def,
     va_list ap;
     char *foo = charalloc(COLS - 3);
     int ret;
+    static bool resetstatuspos = FALSE;
 #ifndef DISABLE_TABCOMP
     bool list = FALSE;
 #endif
@@ -3004,7 +3003,7 @@ int statusq(int allowtabs, const shortcut *s, const char *def,
 #ifndef NANO_SMALL
 		which_history,
 #endif
-		s
+		s, resetstatuspos
 #ifndef DISABLE_TABCOMP
 		, &list
 #endif