Skip to content

Commit

Permalink
decide top row when first display list
Browse files Browse the repository at this point in the history
  • Loading branch information
niha committed Mar 21, 2010
1 parent 30a2bef commit 7b05d7c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/list_display.c
Expand Up @@ -140,6 +140,7 @@ gl_Display_rebuild(struct ListData *ldata)
ldata->selected = row;
}

glist_decide_top(ldata);
glist_display_all(ldata);
}

Expand Down
2 changes: 1 addition & 1 deletion src/list_generic.c
Expand Up @@ -71,7 +71,7 @@ glist_display(struct GenericList *list, const char *name)
return ldata;
}

static void
void
glist_decide_top(struct ListData *ldata)
{
int count = flayer->l_height - 5; /* 2 for header, 1 for footer */
Expand Down
2 changes: 2 additions & 0 deletions src/list_generic.h
Expand Up @@ -63,6 +63,8 @@ void glist_remove_rows __P((struct ListData *ldata));

void glist_display_all __P((struct ListData *list));

void glist_decide_top __P((struct ListData *list));

struct ListData * glist_display __P((struct GenericList *list, const char *name));

void glist_abort __P((void));
Expand Down
2 changes: 2 additions & 0 deletions src/list_window.c
Expand Up @@ -166,6 +166,8 @@ gl_Window_rebuild(struct ListData *ldata)
if (w->w_type == W_TYPE_GROUP && wdata->nested)
row = gl_Window_add_group(ldata, row);
);

glist_decide_top(ldata);
glist_display_all(ldata);
}

Expand Down

0 comments on commit 7b05d7c

Please sign in to comment.