summaryrefslogtreecommitdiff
path: root/lib/libcurses
diff options
context:
space:
mode:
authorblymn <blymn@NetBSD.org>2021-10-19 06:37:29 +0000
committerblymn <blymn@NetBSD.org>2021-10-19 06:37:29 +0000
commit91b4a593ec4c6318528bab1295b156a6552f22a9 (patch)
treed4866e95e327bc5d64f91e8c55948b9d4a25a093 /lib/libcurses
parent3223acab410d0888f2e2423773b6f420cbd84540 (diff)
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 (limited to 'lib/libcurses')
-rw-r--r--lib/libcurses/getch.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libcurses/getch.c b/lib/libcurses/getch.c
index b85e975c621..fb120eaffb9 100644
--- a/lib/libcurses/getch.c
+++ b/lib/libcurses/getch.c
@@ -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",