CE edit improve spacing
This commit is contained in:
@@ -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;
|
||||
@@ -212,7 +212,7 @@ void edit_start (const char* file_path, const char* text) {
|
||||
|
||||
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user