CE styles for status line and line bar
All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m5s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m5s
This commit is contained in:
15
ce/edit.c
15
ce/edit.c
@@ -19,6 +19,10 @@
|
|||||||
#include <tgraphics.h>
|
#include <tgraphics.h>
|
||||||
#include <tscreen.h>
|
#include <tscreen.h>
|
||||||
|
|
||||||
|
#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 edit_line {
|
||||||
struct list_node_link lines_link;
|
struct list_node_link lines_link;
|
||||||
struct gapbuffer gb;
|
struct gapbuffer gb;
|
||||||
@@ -143,8 +147,8 @@ void edit_start (const char* file_path, const char* text) {
|
|||||||
bbptr += w;
|
bbptr += w;
|
||||||
bb_remaining -= w;
|
bb_remaining -= w;
|
||||||
|
|
||||||
w = snprintf (bbptr, bb_remaining, ANSIQ_SETFG_CYAN "%*zu " ANSIQ_GR_RESET, gutter_width,
|
w = snprintf (bbptr, bb_remaining, LINE_NUMBERS_STYLE "%*zu " ANSIQ_GR_RESET,
|
||||||
current_idx + 1);
|
(int)gutter_width, current_idx + 1);
|
||||||
bbptr += w;
|
bbptr += w;
|
||||||
bb_remaining -= w;
|
bb_remaining -= w;
|
||||||
|
|
||||||
@@ -196,7 +200,12 @@ void edit_start (const char* file_path, const char* text) {
|
|||||||
bbptr += w;
|
bbptr += w;
|
||||||
bb_remaining -= 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);
|
editor.cursor.line + 1, editor.cursor.col + 1);
|
||||||
bbptr += w;
|
bbptr += w;
|
||||||
bb_remaining -= w;
|
bb_remaining -= w;
|
||||||
|
|||||||
Reference in New Issue
Block a user