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 /editor.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 'editor.c')
-rw-r--r-- | editor.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -188,8 +188,8 @@ void editor_set_mode(struct editor_state *editor, enum editor_mode mode) if (mode == last_mode) return; - /* Clear the command line if we are leaving command mode. */ - if (last_mode == EDITOR_MODE_COMMAND) { + /* Clear the command line if we are leaving prompt mode. */ + if (last_mode == EDITOR_MODE_PROMPT) { textbuf_clear(&editor->cmdline); } @@ -334,7 +334,7 @@ void editor_draw_message_bar(struct editor_state* editor, struct textbuf *buffer return; } - if (editor->mode == EDITOR_MODE_COMMAND) { + if (editor->mode == EDITOR_MODE_PROMPT) { textbuf_append(buffer, editor->cmdline.buffer, editor->cmdline.length); return; } |