NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lib/56224: libcurses: adding character to last line of non-scrolling window wraps instead of truncates
>Number: 56224
>Category: lib
>Synopsis: libcurses: adding character to last line of non-scrolling window wraps instead of truncates
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jun 01 00:20:00 +0000 2021
>Originator: Michael Forney
>Release:
>Organization:
>Environment:
>Description:
X/Open curses states[0] that when adding a string of characters,
> If scrolling is disabled, any characters that would extend beyond
> the last column of the last line are truncated.
However, NetBSD's libcurses instead clears the line, and wraps back to the start of the last line.
[0] https://pubs.opengroup.org/onlinepubs/7908799/xcurses/intov.html#tag_001_004_002_002
>How-To-Repeat:
This problem was encounter when running catgirl (https://git.causal.agency/catgirl/about/) with NetBSD's libcurses. When the status window (used to show channels which have unread messages) exceeds the terminal width, it is incorrectly wrapped around, showing only the last few channels.
Below is a test program demonstrating the problem. When the terminal is resized below 72 columns, the string wraps around to the beginning of the line instead of getting truncated.
#include <curses.h>
int main(void) {
initscr();
do {
clear();
move(LINES - 1, 0);
addstr("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()");
refresh();
} while (getch() != 'q');
endwin();
return 0;
}
>Fix:
Home |
Main Index |
Thread Index |
Old Index