Skip to content

Conversation

@Bill-Gray
Copy link
Contributor

ncurses allows one to create, move, and resize windows to extend past the right and bottom edges of the screen. PDCurses doesn't allow you to create or move such windows. It will allow you to attempt to resize past those edges and will return a valid window, but will segfault when that window is updated; see issues #162 and #85. This patch fixes both issues.

With ports supporting resizable screens, you also got crashes if the screen is shrunk such that an existing window sticks past the right or bottom edge. That's also now fixed.

The first commit simply says that when refreshing a window, stop copying data when you reach the right and bottom edges of curscr. (At present, there's no way I can see to get windows to go past the left or top edges.)

The second commit, recognizing that such windows can now be displayed without crashing, removes the limits in newwin() and mvwin(). resize_window(), as noted above, already had no such limits.)

…er segfault; wnoutrefresh() clips to those boundaries.
…ight and bottom edges of the screen. (They could already be resized to do so, but you'd segfault when updating the window.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant