Module Name: src Committed By: blymn Date: Tue Oct 19 06:37:29 UTC 2021
Modified Files: src/lib/libcurses: getch.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/lib/libcurses/getch.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libcurses/getch.c diff -u src/lib/libcurses/getch.c:1.77 src/lib/libcurses/getch.c:1.78 --- src/lib/libcurses/getch.c:1.77 Mon Sep 6 07:45:48 2021 +++ src/lib/libcurses/getch.c Tue Oct 19 06:37:29 2021 @@ -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 @@ wgetch(WINDOW *win) 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",