From a11b2103da4ab57e7c7e8ca2144b59718ff90d21 Mon Sep 17 00:00:00 2001 From: kamkow1 Date: Sat, 7 Mar 2026 00:25:42 +0100 Subject: [PATCH] CE edit improve spacing --- ce/edit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ce/edit.c b/ce/edit.c index f66c7c4..dc63df5 100644 --- a/ce/edit.c +++ b/ce/edit.c @@ -130,7 +130,7 @@ void edit_start (const char* file_path, const char* text) { list_foreach (editor.lines, line_link, tmp_line_link) editor.total_lines++; size_t gutter_width = count_digits (editor.total_lines); - size_t effective_cols = (cols > gutter_width + 1) ? cols - (gutter_width + 1) : cols; + size_t effective_cols = (cols > gutter_width + 3) ? cols - (gutter_width + 3) : cols; list_foreach (editor.lines, line_link, tmp_line_link) { if (current_idx < editor.row_offset) { @@ -147,7 +147,7 @@ void edit_start (const char* file_path, const char* text) { bbptr += w; bb_remaining -= w; - w = snprintf (bbptr, bb_remaining, LINE_NUMBERS_STYLE "%*zu " ANSIQ_GR_RESET, + w = snprintf (bbptr, bb_remaining, LINE_NUMBERS_STYLE " %*zu " ANSIQ_GR_RESET " ", (int)gutter_width, current_idx + 1); bbptr += w; bb_remaining -= w; @@ -205,14 +205,14 @@ 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" ANSIQ_GR_RESET, file_path, + 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; w = snprintf (bbptr, bb_remaining, ANSIQ_DYN_CUR_SET ANSIQ_CUR_VISIBLE, (int)(editor.cursor.line - editor.row_offset) + 1, - (int)(editor.cursor.col - editor.col_offset) + 1 + (int)gutter_width + 1); + (int)(editor.cursor.col - editor.col_offset) + 1 + (int)gutter_width + 3); bbptr += w; bb_remaining -= w;