From 37ff9197e0a8f70cce7491bc352feb8d3bc39181 Mon Sep 17 00:00:00 2001 From: kamkow1 Date: Fri, 6 Mar 2026 23:00:04 +0100 Subject: [PATCH] CE styles for status line and line bar --- ce/edit.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ce/edit.c b/ce/edit.c index 3198ff0..f66c7c4 100644 --- a/ce/edit.c +++ b/ce/edit.c @@ -19,6 +19,10 @@ #include #include +#define LINE_NUMBERS_STYLE ANSIQ_GR_SEQ (ANSIQ_BG_RGB (17, 115, 176) ANSIQ_FG_WHITE) + +#define STATUS_LINE_STYLE ANSIQ_GR_SEQ (ANSIQ_BG_RGB (240, 191, 88) ANSIQ_FG_BLACK) + struct edit_line { struct list_node_link lines_link; struct gapbuffer gb; @@ -143,8 +147,8 @@ void edit_start (const char* file_path, const char* text) { bbptr += w; bb_remaining -= w; - w = snprintf (bbptr, bb_remaining, ANSIQ_SETFG_CYAN "%*zu " ANSIQ_GR_RESET, gutter_width, - current_idx + 1); + w = snprintf (bbptr, bb_remaining, LINE_NUMBERS_STYLE "%*zu " ANSIQ_GR_RESET, + (int)gutter_width, current_idx + 1); bbptr += w; bb_remaining -= w; @@ -196,7 +200,12 @@ void edit_start (const char* file_path, const char* text) { bbptr += w; bb_remaining -= w; - w = snprintf (bbptr, bb_remaining, "Editing %s; line %zu col %zu", file_path, + w = snprintf (bbptr, bb_remaining, STATUS_LINE_STYLE "%*s" ANSIQ_DYN_CUR_SET, (int)cols, "", + (int)rows, 1); + bbptr += w; + bb_remaining -= w; + + w = snprintf (bbptr, bb_remaining, "Editing %s; line %zu col %zu" ANSIQ_GR_RESET, file_path, editor.cursor.line + 1, editor.cursor.col + 1); bbptr += w; bb_remaining -= w;