Color theming

This commit is contained in:
Arthur Barraux
2026-01-22 14:00:47 +01:00
parent fa7f8d39d8
commit f3bd5dd1c9
15 changed files with 472 additions and 207 deletions
+21
View File
@@ -1,9 +1,30 @@
#include <stdarg.h>
#include "../include/editor_op.h"
#include "../include/row_op.h"
extern struct editorConfig E;
/**
* @brief Sets a temporary status message for display
* @details Formats and stores a message that will be displayed in the message
* bar for 5 seconds. Uses printf-style variable argument formatting.
* @param fmt Printf-style format string
* @param ... Variable arguments for format string
* @note Updates global editor state E (status_msg, status_msg_time)
* @see editorDrawMessageBar()
*/
void editorSetStatusMessage(const char *fmt, ...) {
va_list ap;
va_start(ap, fmt);
vsnprintf(E.status_msg, sizeof(E.status_msg), fmt, ap);
va_end(ap);
E.status_msg_time = time(NULL);
}
void editorInsertChar(int c) {
if (E.cursor_y == E.numrows) {
editorInsertRow(E.numrows, "", 0);