]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/base/lib_getch.c
ncurses 6.3 - patch 20220507
[ncurses.git] / ncurses / base / lib_getch.c
index 38537591afc0ab8bda04ed5ec382ba0292453584..0d719cfcda97649d2f671ee5ca2d0ffa7558f771 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018-2019,2020 Thomas E. Dickey                                *
+ * Copyright 2018-2020,2021 Thomas E. Dickey                                *
  * Copyright 1998-2015,2016 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -44,7 +44,7 @@
 #define NEED_KEY_EVENT
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_getch.c,v 1.141 2020/09/05 22:50:47 tom Exp $")
+MODULE_ID("$Id: lib_getch.c,v 1.143 2021/10/23 17:06:20 tom Exp $")
 
 #include <fifo_defs.h>
 
@@ -404,7 +404,7 @@ recur_wrefresh(WINDOW *win)
     } else
 #endif
        if ((is_wintouched(win) || (win->_flags & _HASMOVED))
-           && !(win->_flags & _ISPAD)) {
+           && !IS_PAD(win)) {
        wrefresh(win);
     }
 }
@@ -551,7 +551,7 @@ _nc_wgetch(WINDOW *win,
         * This is tricky.  We only want to get special-key
         * events one at a time.  But we want to accumulate
         * mouse events until either (a) the mouse logic tells
-        * us it's picked up a complete gesture, or (b)
+        * us it has picked up a complete gesture, or (b)
         * there's a detectable time lapse after one.
         *
         * Note: if the mouse code starts failing to compose
@@ -639,7 +639,7 @@ _nc_wgetch(WINDOW *win,
      * However, we provide the same visual result as Solaris, moving the
      * cursor to the left.
      */
-    if (sp->_echo && !(win->_flags & _ISPAD)) {
+    if (sp->_echo && !IS_PAD(win)) {
        chtype backup = (chtype) ((ch == KEY_BACKSPACE) ? '\b' : ch);
        if (backup < KEY_MIN)
            wechochar(win, backup);