diff options
author | cflip <cflip@cflip.net> | 2023-01-31 12:33:30 -0700 |
---|---|---|
committer | cflip <cflip@cflip.net> | 2023-01-31 14:00:17 -0700 |
commit | 264c4186ed8e3d2e3275a6514c8714903036cb26 (patch) | |
tree | 60aaea6be43b128bcff1d3e46ec6cc6d103bbf13 /input.c | |
parent | 16b949aa3147e3aaadb6888f574f6424d4c2d8f3 (diff) |
Rename the 'command mode' to 'prompt mode'
Since this mode will also be used to accept input for setting the
filename, searching for a string and possibly more, it makes more sense
for this mode to be called prompt mode. There is also less ambiguity
between normal mode because sometimes that is also called command mode.
Diffstat (limited to 'input.c')
-rw-r--r-- | input.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -14,7 +14,7 @@ void input_process_textinput(struct editor_state *editor, const char *text) if (editor->mode == EDITOR_MODE_INSERT) { editor_insert_char(editor, *text); - } else if (editor->mode == EDITOR_MODE_COMMAND) { + } else if (editor->mode == EDITOR_MODE_PROMPT) { textbuf_append(&editor->cmdline, text, 1); } } @@ -37,7 +37,7 @@ void editor_process_keypress(struct editor_state *editor, SDL_Keysym *keysym) return; } - if (editor->mode == EDITOR_MODE_COMMAND) { + if (editor->mode == EDITOR_MODE_PROMPT) { if (keysym->sym == SDLK_BACKSPACE) textbuf_delete(&editor->cmdline); @@ -106,7 +106,7 @@ void editor_process_keypress(struct editor_state *editor, SDL_Keysym *keysym) break; case SDLK_SEMICOLON: if (keysym->mod & KMOD_SHIFT) - editor_set_mode(editor, EDITOR_MODE_COMMAND); + editor_set_mode(editor, EDITOR_MODE_PROMPT); break; } } |