コード例 #1
0
ファイル: view.c プロジェクト: cosminadrianpopescu/vifm
/* Either scrolls to specific line number (when specified) or to the bottom of
 * the view. */
static void
cmd_G(key_info_t key_info, keys_info_t *keys_info)
{
	if(key_info.count != NO_COUNT_GIVEN)
	{
		cmd_g(key_info, keys_info);
		return;
	}

	if(scroll_to_bottom(vi))
	{
		draw();
	}
}
コード例 #2
0
ファイル: view.c プロジェクト: lyuts/vifm
static void
cmd_G(key_info_t key_info, keys_info_t *keys_info)
{
	if(key_info.count != NO_COUNT_GIVEN)
	{
		cmd_g(key_info, keys_info);
		return;
	}

	if(vi->linev + 1 + vi->view->window_rows - 1 > vi->nlinesv)
		return;

	vi->linev = vi->nlinesv - (vi->view->window_rows - 1);
	for(vi->line = 0; vi->line < vi->nlines - 1; vi->line++)
		if(vi->linev < vi->widths[vi->line + 1][0])
			break;

	draw();
}