NetBSD-Bugs archive

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

lib/53615: curses(3) KEY_RESIZE does not work



>Number:         53615
>Category:       lib
>Synopsis:       curses(3) KEY_RESIZE does not work
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 18 12:20:00 +0000 2018
>Originator:     Kamil Rytarowski
>Release:        NetBSD 8.99.24 amd64
>Organization:
TNF
>Environment:
NetBSD rugged 8.99.24 NetBSD 8.99.24 (GENERIC) #8: Fri Aug 31 21:55:37 CEST 2018  root@chieftec:/public/netbsd-root/sys/arch/amd64/compile/GENERIC amd64
>Description:
getch(3) documents:

If the terminal is resized, getch() will return KEY_RESIZE,
regardless of the setting of keypad().

However with and without keypad(3) option, getch(3) returns -1 (ERR).

The same code works well with ncurses.
>How-To-Repeat:
#include <stdio.h>
#include <curses.h>

int
main(int argc, char **argv)
{
	initscr();
	int w = getch();
	endwin();

	printf("w=%d\n", w);

	return 0;
}

$ gcc -lcurses key.c
$ ./a.out
# resize terminal
# see report -1 (ERR)
>Fix:
N/A



Home | Main Index | Thread Index | Old Index