Example #1
0
void
view_ruler_update(void)
{
	char buf[POS_WIN_MIN_WIDTH + 1];
	snprintf(buf, sizeof(buf), "%d-%d ", vi->line + 1, vi->nlines);

	ui_ruler_set(buf);
}
Example #2
0
/* Displays current menu position on a ruler. */
static void
show_position_in_menu(const menu_data_t *m)
{
	char pos_buf[POS_WIN_MIN_WIDTH + 1];
	snprintf(pos_buf, sizeof(pos_buf), " %d-%d ", m->pos + 1, m->len);

	ui_ruler_set(pos_buf);
}