diff -ur readline-8.1.2/readline.c readline-8.1.3/readline.c
--- readline-8.1.2/readline.c	2020-12-19 07:55:06.477760951 -0500
+++ readline-8.1.3/readline.c	2020-12-19 07:56:17.722659252 -0500
@@ -1186,8 +1186,13 @@
       RL_SETSTATE(RL_STATE_INITIALIZED);
     }
   else
-    _rl_reset_locale ();	/* check current locale and set locale variables */
+    {
+      _rl_reset_locale ();	/* check current locale and set locale variables */
+#if defined (__MINGW32__)
+      rl_reset_screen_size ();
+#endif      
+    }
 
   /* Initialize the current line information. */
   _rl_init_line_state ();
 
Only in readline-8.1.3: readline.c.orig
diff -ur readline-8.1.2/signals.c readline-8.1.3/signals.c
--- readline-8.1.2/signals.c	2020-12-19 07:55:06.471760622 -0500
+++ readline-8.1.3/signals.c	2020-12-19 08:19:50.548964783 -0500
@@ -46,6 +46,11 @@
 
 #include "rlprivate.h"
 
+#if defined (__MINGW32__)
+#  define WIN32_LEAN_AND_MEAN
+#  include <windows.h>
+#endif
+
 #if defined (HANDLE_SIGNALS)
 
 #if !defined (RETSIGTYPE)
@@ -92,7 +97,7 @@
 int rl_catch_signals = 1;
 
 /* If non-zero, readline will install a signal handler for SIGWINCH. */
-#ifdef SIGWINCH
+#if defined (SIGWINCH) || defined(__MINGW32__)
 int rl_catch_sigwinch = 1;
 #else
 int rl_catch_sigwinch = 0;	/* for the readline state struct in readline.c */
@@ -532,6 +539,21 @@
     }
 #endif /* SIGWINCH */
 
+#if defined (__MINGW32__)
+  if (rl_catch_sigwinch && sigwinch_set_flag == 0)
+    {
+      DWORD mode;
+      HANDLE hStdIn = GetStdHandle (STD_INPUT_HANDLE);
+
+      if (GetConsoleMode (hStdIn, &mode))
+        {
+          mode |= ENABLE_WINDOW_INPUT;
+          if (SetConsoleMode (hStdIn, mode))
+            sigwinch_set_flag = 1;
+        }
+    }
+#endif
+
   return 0;
 }
 
@@ -582,6 +604,20 @@
       sigwinch_set_flag = 0;
     }
 #endif
+#if defined (__MINGW32__)
+  if (rl_catch_sigwinch && sigwinch_set_flag == 1)
+    {
+      DWORD mode;
+      HANDLE hStdIn = GetStdHandle (STD_INPUT_HANDLE);
+
+      if (GetConsoleMode (hStdIn, &mode))
+        {
+          mode &= ~ENABLE_WINDOW_INPUT;
+          if (SetConsoleMode (hStdIn, mode))
+            sigwinch_set_flag = 0;
+        }
+    }
+#endif
 
   return 0;
 }
