Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205279
b: refs/heads/master
c: 8c694d2
h: refs/heads/master
i:
  205277: 445777e
  205275: 0565650
  205271: 9f5b4b5
  205263: 82c1e01
  205247: 146a675
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Jun 21, 2010
1 parent dd507bc commit 90c2a02
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bfde744863eab22a3a400c9003f4f555c903f61d
refs/heads/master: 8c694d2559acf09bfd8b71fe1795e740063ad803
11 changes: 8 additions & 3 deletions trunk/tools/perf/util/newt.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,11 @@ struct ui_browser {
u32 nr_entries;
};

static bool ui_browser__is_current_entry(struct ui_browser *self, unsigned row)
{
return (self->first_visible_entry_idx + row) == self->index;
}

static void ui_browser__refresh_dimensions(struct ui_browser *self)
{
int cols, rows;
Expand All @@ -286,8 +291,8 @@ static void ui_browser__refresh_dimensions(struct ui_browser *self)

static void ui_browser__reset_index(struct ui_browser *self)
{
self->index = self->first_visible_entry_idx = 0;
self->first_visible_entry = NULL;
self->index = self->first_visible_entry_idx = 0;
self->first_visible_entry = NULL;
}

static int objdump_line__show(struct objdump_line *self, struct list_head *head,
Expand Down Expand Up @@ -353,7 +358,7 @@ static int ui_browser__refresh_entries(struct ui_browser *self)
pos = list_entry(self->first_visible_entry, struct objdump_line, node);

list_for_each_entry_from(pos, head, node) {
bool current_entry = (self->first_visible_entry_idx + row) == self->index;
bool current_entry = ui_browser__is_current_entry(self, row);
SLsmg_gotorc(self->top + row, self->left);
objdump_line__show(pos, head, self->width,
he, len, current_entry);
Expand Down

0 comments on commit 90c2a02

Please sign in to comment.