Color theming
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user