char *text, *cmd;
text = vb_get_input_text();
- /* skip leading promt char like ':' or '/' */
+ /* skip leading prompt char like ':' or '/' */
/* TODO should we use a flag to determine if we should record the command
* into the history - maybe it's not good to save commands in history that
* where triggered by a map like ':name \, :set scripts!<cr>' - by the way
? strchr(g_modes, pmode) != NULL
: strchr(modes, pmode) != NULL;
- /* fill pointer only if the promt was valid */
+ /* fill pointer only if the prompt was valid */
if (res) {
if (mode != NULL) {
*mode = pmode;
* Set the prompt chars and switch to new mode.
*
* @id: Mode id.
- * @prompt: Prompt string to set as current promt.
+ * @prompt: Prompt string to set as current prompt.
* @print_prompt: Indicates if the new set prompt should be put into inputbox
* after switching the mode.
*/
-void mode_enter_promt(char id, const char *prompt, gboolean print_prompt)
+void mode_enter_prompt(char id, const char *prompt, gboolean print_prompt)
{
/* set the prompt to be accessible in mode_enter */
strncpy(vb.state.prompt, prompt, PROMPT_SIZE - 1);
void mode_add(char id, ModeTransitionFunc enter, ModeTransitionFunc leave,
ModeKeyFunc keypress, ModeInputChangedFunc input_changed);
void mode_enter(char id);
-void mode_enter_promt(char id, const char *prompt, gboolean print_prompt);
+void mode_enter_prompt(char id, const char *prompt, gboolean print_prompt);
VbResult mode_handle_key(int key);
gboolean mode_input_focusin(GtkWidget *widget, GdkEventFocus *event, gpointer data);
gboolean mode_input_focusout(GtkWidget *widget, GdkEventFocus *event, gpointer data);
static VbResult normal_ex(const NormalCmdInfo *info)
{
if (info->key == 'F') {
- mode_enter_promt('c', ";t", true);
+ mode_enter_prompt('c', ";t", true);
} else if (info->key == 'f') {
- mode_enter_promt('c', ";o", true);
+ mode_enter_prompt('c', ";o", true);
} else {
char prompt[2] = {info->key, '\0'};
- mode_enter_promt('c', prompt, true);
+ mode_enter_prompt('c', prompt, true);
}
return RESULT_COMPLETE;
return RESULT_ERROR;
}
- mode_enter_promt('c', prompt, true);
+ mode_enter_prompt('c', prompt, true);
return RESULT_COMPLETE;
}
}
/* switch mode after setting the input text to not trigger the
* commands modes input change handler */
- mode_enter_promt('c', ":", false);
+ mode_enter_prompt('c', ":", false);
return RESULT_COMPLETE;
}