clean working dir

This commit is contained in:
2026-05-26 10:32:23 +02:00
parent 6b6b3d1766
commit 8eeef59a98
6 changed files with 34 additions and 5 deletions
+29
View File
@@ -328,6 +328,35 @@ void editorDrawMessageBar(struct abuf* ab)
}
}
void editorDrawContextBuffer(struct abuf* ab)
{
int pos_len;
char pos_buf[1024];
int i, j;
if (!E.context_buffers)
return;
appDebug("Printing context");
for (i = 0; i < E.context_buffers->height; ++i)
{
if (E.context_buffers->editor_y + i + 1 > 0)
{
pos_len = snprintf(pos_buf, sizeof(pos_buf), "\x1b[%d;%dH",
E.context_buffers->editor_y + i + 1, E.context_buffers->editor_x - 2);
abAppend(ab, pos_buf, pos_len);
// Apply background color (6 bytes for RGB format)
abAppend(ab, E.theme.BACKGROUND_COLOR, (int) strlen(E.theme.BACKGROUND_COLOR));
abAppend(ab, "|", 1);
abAppend(ab, E.context_buffers->rows->chars, E.context_buffers->rows->size);
abAppend(ab, "|", 1);
}
}
free(E.context_buffers);
E.context_buffers = NULL;
}
/**
* @brief Performs complete screen refresh and buffer synchronization