mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-10 09:39:03 -04:00
[ncplane_scrollup_child] test for descendance, not immediate parenthood
This commit is contained in:
parent
46fd9317e5
commit
4aae5787de
@ -1772,8 +1772,8 @@ int ncplane_scrollup(ncplane* n, int r){
|
||||
// error if |child| is not a child of |n|, or |n| is not scrolling, or |child|
|
||||
// is fixed. Returns the number of scrolling events otherwise (might be 0).
|
||||
int ncplane_scrollup_child(ncplane* n, const ncplane* child){
|
||||
if(ncplane_parent_const(child) != n){
|
||||
logerror("not a child of specified plane");
|
||||
if(!ncplane_descendant_p(child, n)){
|
||||
logerror("not a descendant of specified plane");
|
||||
return -1;
|
||||
}
|
||||
if(child->fixedbound){
|
||||
|
Loading…
x
Reference in New Issue
Block a user