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
+1
View File
@@ -90,3 +90,4 @@
(map-key "CTRL-k" editor-cut-end-line "no-prefix")
(map-key "a" editor-move-cursor-beg-buffer "user")
(map-key "z" editor-move-cursor-end-buffer "user")
;; (map-key "x" editor-auto-complete "user")
+1
View File
@@ -53,6 +53,7 @@ Lisp editorMoveEndBuffer(Lisp args, LispError *e, LispContext ctx);
// Other
Lisp editorAutoComplete(Lisp args, LispError *e, LispContext ctx);
void free_structs(void);
-2
View File
@@ -30,6 +30,4 @@ src_files = files(
executable('beluga',
src_files,
dependencies: [m]
)
dependencies: [m]
)
+1 -2
View File
@@ -15,7 +15,6 @@
#include "../include/input.h"
#include "../include/terminal.h"
#include "../include/split_screen.h"
#include "../include/completion.h"
#include <stdio.h>
#include <stdlib.h>
@@ -556,6 +555,6 @@ Lisp editorMoveEndBuffer(Lisp args, LispError *e, LispContext ctx)
Lisp editorAutoComplete(Lisp args, LispError *e, LispContext ctx)
{
createContextBuffer(E.cursor_x - 2, E.cursor_y + 1, "hello");
// createContextBuffer(E.cursor_x - 2, E.cursor_y + 1, "hello");
return lisp_null();
}
+1
View File
@@ -49,6 +49,7 @@ void initBuiltins() {
registerBuiltin("editor-cut-end-line", editorCutEndLine);
registerBuiltin("editor-move-cursor-beg-buffer", editorMoveBegBuffer);
registerBuiltin("editor-move-cursor-end-buffer", editorMoveEndBuffer);
registerBuiltin("editor-auto-complete", editorAutoComplete);
}
void initConfig() {
+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