pane_resize() now reports if any change happened.
One caller wants this.
Signed-off-by: NeilBrown <neil@brown.name>
- [X] revalidate_start shouldn't find cursor on line where it is known
not to be
- [X] call_render_line_to_point() never returns negative - why do we check?
-- [ ] should pane_resize() report if any change happened?
+- [X] should pane_resize() report if any change happened?
- [ ] I think I want a "Workspaces" concept, maybe tabbed set of tile
collections. I would have one of mail and one for each project
that I might be looking in. I have lots of documents, but few
unalloc_safe(p, pane);
}
-void pane_resize(struct pane *p safe, int x, int y, int w, int h)
+bool pane_resize(struct pane *p safe, int x, int y, int w, int h)
{
int damage = 0;
pane_damaged(p, damage);
if (damage)
pane_notify("Notify:resize", p);
+ return !!damage;
}
void pane_reparent(struct pane *p safe, struct pane *newparent safe)
void pane_move_after(struct pane *p safe, struct pane *after);
void pane_subsume(struct pane *p safe, struct pane *parent safe);
void pane_close(struct pane *p safe);
-void pane_resize(struct pane *p safe, int x, int y, int w, int h);
+bool pane_resize(struct pane *p safe, int x, int y, int w, int h);
void pane_focus(struct pane *p);
bool pane_has_focus(struct pane *p);
void pane_damaged(struct pane *p, int type);
m && m->mdata ; m = vmark_next(m)) {
struct pane *hp = m->mdata;
int cols;
- hp->damaged &= ~DAMAGED_SIZE;
- pane_resize(hp, hp->x, y, hp->w, hp->h);
- if (hp->damaged & DAMAGED_SIZE && !rl->background_uniform)
+ if (pane_resize(hp, hp->x, y, hp->w, hp->h) &&
+ !rl->background_uniform)
pane_damaged(hp, DAMAGED_REFRESH);
y += hp->h;
cols = pane_attr_get_int(hp, "width", 0);