Esempio n. 1
0
/* Switch to command-line mode. */
static void
cmd_colon(key_info_t key_info, keys_info_t *keys_info)
{
	update_marks(view);
	set_count_vars(key_info.count);
	enter_cmdline_mode(CLS_COMMAND, "", NULL);
}
Esempio n. 2
0
File: menu.c Progetto: cfillion/vifm
void
menu_morph_into_cmdline(CmdLineSubmode submode, const char input[],
		int external)
{
	/* input might point to part of menu data. */
	char *input_copy;

	if(input[0] == '\0')
	{
		show_error_msg("Command insertion", "Ignoring empty command");
		return;
	}

	input_copy = external ? format_str("!%s", input) : strdup(input);
	if(input_copy == NULL)
	{
		show_error_msg("Error", "Not enough memory");
		return;
	}

	leave_menu_mode(0);
	enter_cmdline_mode(submode, input_copy, NULL);

	free(input_copy);
}
Esempio n. 3
0
File: menu.c Progetto: cfillion/vifm
static void
cmd_colon(key_info_t key_info, keys_info_t *keys_info)
{
	cmds_conf.begin = 1;
	cmds_conf.current = menu->pos;
	cmds_conf.end = menu->len;
	enter_cmdline_mode(CLS_MENU_COMMAND, "", menu);
}
Esempio n. 4
0
File: menu.c Progetto: acklinr/vifm
static void
cmd_qmark(key_info_t key_info, keys_info_t *keys_info)
{
	last_search_backward = 1;
	menus_search_reset(menu->state, last_search_backward,
			def_count(key_info.count));
	enter_cmdline_mode(CLS_MENU_BSEARCH, "", menu);
}
Esempio n. 5
0
static void
cmd_colon(key_info_t key_info, keys_info_t *keys_info)
{
	cmds_conf.begin = 1;
	cmds_conf.current = menu->pos;
	cmds_conf.end = menu->len;
	enter_cmdline_mode(MENU_CMD_SUBMODE, L"", menu);
}
Esempio n. 6
0
File: menu.c Progetto: cfillion/vifm
static void
cmd_question(key_info_t key_info, keys_info_t *keys_info)
{
	menu->search_repeat = def_count(key_info.count);
	last_search_backward = 1;
	menu->backward_search = 1;
	free(menu->regexp);
	enter_cmdline_mode(CLS_MENU_BSEARCH, "", menu);
}
Esempio n. 7
0
static void
cmd_question(key_info_t key_info, keys_info_t *keys_info)
{
	search_repeat = (key_info.count == NO_COUNT_GIVEN) ? 1 : key_info.count;
	last_search_backward = 1;
	menu->match_dir = NONE;
	free(menu->regexp);
	enter_cmdline_mode(MENU_SEARCH_BACKWARD_SUBMODE, L"", menu);
}
Esempio n. 8
0
File: menu.c Progetto: cfillion/vifm
static void
cmd_slash(key_info_t key_info, keys_info_t *keys_info)
{
	menu->search_repeat = def_count(key_info.count);
	last_search_backward = 0;
	menu->backward_search = 0;
	free(menu->regexp);
	menu->regexp = NULL;
	enter_cmdline_mode(CLS_MENU_FSEARCH, "", menu);
}
Esempio n. 9
0
static void
cmd_qmark(key_info_t key_info, keys_info_t *keys_info)
{
	vi->search_repeat = key_info.count;
	enter_cmdline_mode(CLS_VWBSEARCH, L"", NULL);
}
Esempio n. 10
0
/* Switch to command-line mode. */
static void
cmd_colon(key_info_t key_info, keys_info_t *keys_info)
{
	update_marks(view);
	enter_cmdline_mode(CMD_SUBMODE, L"", NULL);
}
Esempio n. 11
0
File: view.c Progetto: lyuts/vifm
static void
cmd_qmark(key_info_t key_info, keys_info_t *keys_info)
{
	vi->search_repeat = key_info.count;
	enter_cmdline_mode(VIEW_SEARCH_BACKWARD_SUBMODE, L"", NULL);
}
Esempio n. 12
0
SETUP()
{
	init_modes();
	enter_cmdline_mode(CLS_COMMAND, "", NULL);
}
Esempio n. 13
0
/* Switches to command-line mode. */
static void
cmd_colon(key_info_t key_info, keys_info_t *keys_info)
{
    leave_more_mode();
    enter_cmdline_mode(CLS_COMMAND, "", NULL);
}