/* 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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
/* 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); }
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); }
SETUP() { init_modes(); enter_cmdline_mode(CLS_COMMAND, "", NULL); }
/* 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); }