summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcflip <cflip@cflip.net>2023-01-12 12:32:12 -0700
committercflip <cflip@cflip.net>2023-01-12 12:32:12 -0700
commit2021a3c4c0cd13d3a4f5ac097badb2eaedea1013 (patch)
treebe105f5f1095fadd19d223f6b3913e44f1dfaad3
parentc59f63a5be50c54ca4f38f48e2dc82d8d8fd012a (diff)
Add an indicator to the status bar when in insert mode
-rw-r--r--editor.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/editor.c b/editor.c
index d52d553..ade6a77 100644
--- a/editor.c
+++ b/editor.c
@@ -318,6 +318,11 @@ void editor_draw_status_bar(struct editor_state* editor, struct append_buffer* b
void editor_draw_message_bar(struct editor_state* editor, struct append_buffer* buffer)
{
+ if (editor->mode == EDITOR_MODE_INSERT) {
+ ab_append(buffer, "--INSERT--", 10);
+ return;
+ }
+
int message_length = strlen(editor->status_message);
if (message_length > editor->screen_cols)