mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-08 01:10:23 +00:00
[ncplane_dup] don't use ncplane_cursor_move_yx(), set cursor directly
This commit is contained in:
parent
6f90d20543
commit
549fcac603
@ -706,10 +706,10 @@ ncplane* ncplane_dup(const ncplane* n, void* opaque){
|
||||
return NULL;
|
||||
}
|
||||
memmove(newn->fb, n->fb, fbsize);
|
||||
if(ncplane_cursor_move_yx(newn, n->y, n->x) < 0){
|
||||
ncplane_destroy(newn);
|
||||
return NULL;
|
||||
}
|
||||
// don't use ncplane_cursor_move_yx() here; the cursor could be in an
|
||||
// invalid location, which will be disallowed, failing out.
|
||||
newn->y = n->y;
|
||||
newn->x = n->x;
|
||||
newn->halign = n->halign;
|
||||
newn->stylemask = ncplane_styles(n);
|
||||
newn->channels = ncplane_channels(n);
|
||||
|
Loading…
Reference in New Issue
Block a user