READ ONLY state for buffers
Build project / build (push) Successful in 36s

This commit is contained in:
2026-05-23 15:42:17 +02:00
parent 310498d582
commit c4d772e465
8 changed files with 58 additions and 11 deletions
+18 -1
View File
@@ -341,7 +341,7 @@ Lisp editorOpenFile(Lisp args, LispError *e, LispContext ctx) {
if (filename) {
// editorOpen(filename);
EditorPane *active = splitScreenGetActivePane();
active->buffer_id = bufferCreate(filename);
active->buffer_id = bufferCreate(filename, READ_AND_WRITE);
}
free(filename);
@@ -434,6 +434,23 @@ Lisp bufferFind_L(Lisp args, LispError *e, LispContext ctx) {
return lisp_null();
}
/**
* @brief Lisp function to search for text
* @details Wrapper around editorFind() for use in Lisp keybindings.
* @param args Lisp arguments (unused)
* @param e Error pointer for Lisp error handling
* @param ctx Lisp context
* @return lisp_null()
* @see editorFind()
*/
Lisp bufferFindReverse_L(Lisp args, LispError *e, LispContext ctx) {
appDebug("LispFind\n");
EditorPane *active = splitScreenGetActivePane();
struct buffer_t *buffer = bufferFindById(active->buffer_id);
bufferFindReverse(buffer);
return lisp_null();
}
/**
* @brief Lisp function to read character at cursor
* @details Returns the character at the current cursor position as a Lisp