mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-10 01:29:05 -04:00
[tfman] move structure browser along with page browser
This commit is contained in:
parent
aa1a3fc3f5
commit
bcf713b5bc
@ -154,21 +154,21 @@ int docstructure_move(docstructure* ds, int newy){
|
||||
docnode* pdn = NULL;
|
||||
docnode* dn;
|
||||
if(newy > ds->cury){
|
||||
while((dn = nctree_prev(ds->nct)) != pdn){
|
||||
if(dn->y > newy){
|
||||
dn = nctree_next(ds->nct);
|
||||
break;
|
||||
}
|
||||
pdn = dn;
|
||||
dn = nctree_prev(ds->nct);
|
||||
if(dn->y > newy){
|
||||
dn = nctree_next(ds->nct);
|
||||
}
|
||||
/*while((dn = nctree_prev(ds->nct)) != pdn){
|
||||
pdn = dn;
|
||||
}*/
|
||||
}else if(newy < ds->cury){
|
||||
while((dn = nctree_next(ds->nct)) != pdn){
|
||||
if(dn->y > newy){
|
||||
dn = nctree_prev(ds->nct);
|
||||
break;
|
||||
}
|
||||
pdn = dn;
|
||||
dn = nctree_next(ds->nct);
|
||||
if(dn->y < newy){
|
||||
dn = nctree_prev(ds->nct);
|
||||
}
|
||||
/*while((dn = nctree_next(ds->nct)) != pdn){
|
||||
pdn = dn;
|
||||
}*/
|
||||
}
|
||||
ds->cury = newy;
|
||||
if(nctree_redraw(ds->nct)){
|
||||
|
Loading…
x
Reference in New Issue
Block a user