Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libcurses Fix for PR pkg/55931



details:   https://anonhg.NetBSD.org/src/rev/be58b521f88a
branches:  trunk
changeset: 989891:be58b521f88a
user:      blymn <blymn%NetBSD.org@localhost>
date:      Tue Oct 19 06:37:29 2021 +0000

description:
Fix for PR pkg/55931
Don't move the cursor when getch is called if input is not going to
be echoed.  Lynx uses the cursor to mark the current selection in a
pop-up, previously the cursor was being relocated when getch was called
which broke the Lynx item marking.

diffstat:

 lib/libcurses/getch.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 6c4d7aba608b -r be58b521f88a lib/libcurses/getch.c
--- a/lib/libcurses/getch.c     Tue Oct 19 03:47:33 2021 +0000
+++ b/lib/libcurses/getch.c     Tue Oct 19 06:37:29 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: getch.c,v 1.77 2021/09/06 07:45:48 rin Exp $   */
+/*     $NetBSD: getch.c,v 1.78 2021/10/19 06:37:29 blymn Exp $ */
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)getch.c    8.2 (Berkeley) 5/4/94";
 #else
-__RCSID("$NetBSD: getch.c,v 1.77 2021/09/06 07:45:48 rin Exp $");
+__RCSID("$NetBSD: getch.c,v 1.78 2021/10/19 06:37:29 blymn Exp $");
 #endif
 #endif                                 /* not lint */
 
@@ -800,8 +800,8 @@
        if (!(win->flags & __ISPAD)) {
                if (is_wintouched(win))
                        wrefresh(win);
-               else if ((_cursesi_screen->curscr->cury != (win->begy + win->cury))
-                        || (_cursesi_screen->curscr->curx != (win->begx + win->curx))) {
+               else if (__echoit && ((_cursesi_screen->curscr->cury != (win->begy + win->cury))
+                        || (_cursesi_screen->curscr->curx != (win->begx + win->curx)))) {
                        __CTRACE(__CTRACE_INPUT,
                            "wgetch: curscr cury %d cury %d "
                            "curscr curx %d curx %d\n",



Home | Main Index | Thread Index | Old Index