]> git.ipfire.org Git - thirdparty/bash.git/blobdiff - lib/readline/terminal.c
Bash-4.2 distribution sources and documentation
[thirdparty/bash.git] / lib / readline / terminal.c
index ee130926999fa0dcb49d50100dd1a2621a406ca8..f8c2f6ed1c93d10316319d35fc835f220f470539 100644 (file)
@@ -96,12 +96,12 @@ static char *term_string_buffer = (char *)NULL;
 
 static int tcap_initialized;
 
-#if !defined (__linux__)
+#if !defined (__linux__) && !defined (NCURSES_VERSION)
 #  if defined (__EMX__) || defined (NEED_EXTERN_PC)
 extern 
 #  endif /* __EMX__ || NEED_EXTERN_PC */
 char PC, *BC, *UP;
-#endif /* __linux__ */
+#endif /* !__linux__ && !NCURSES_VERSION */
 
 /* Some strings to control terminal actions.  These are output by tputs (). */
 char *_rl_term_clreol;
@@ -350,9 +350,9 @@ rl_reset_screen_size ()
 void
 rl_resize_terminal ()
 {
+  _rl_get_screen_size (fileno (rl_instream), 1);
   if (_rl_echoing_p)
     {
-      _rl_get_screen_size (fileno (rl_instream), 1);
       if (CUSTOM_REDISPLAY_FUNC ())
        rl_forced_update_display ();
       else if (RL_ISSTATE(RL_STATE_REDISPLAYING) == 0)