From 2021a3c4c0cd13d3a4f5ac097badb2eaedea1013 Mon Sep 17 00:00:00 2001 From: cflip Date: Thu, 12 Jan 2023 12:32:12 -0700 Subject: Add an indicator to the status bar when in insert mode --- editor.c | 5 +++++ 1 file changed, 5 insertions(+) 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) -- cgit v1.2.3