clean working dir
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user