esc

Externally Scriptable Editor

git clone git://mccd.space/esc

commit 10a81c56c8d241cb8a20acdd0a21ecfffd068f61
parent 3581dfe2b9200a5004fae2d80e38aff37f88e436
Author: Marc Coquand <marc@coquand.email>
Date:   Wed, 25 Feb 2026 16:20:16 +0100

Remove unused

Diffstat:
Mfuse_ipc.c | 16+++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/fuse_ipc.c b/fuse_ipc.c
@@ -96,9 +96,7 @@ static int is_dir(const char *path) {
 	       strcmp(path, "/buffer/0") == 0;
 }
 
-static int is_symlink(const char *path) {
-	return strcmp(path, "/cwd") == 0;
-}
+static int is_symlink(const char *path) { return strcmp(path, "/cwd") == 0; }
 
 static int is_file(const char *path) {
 	return strcmp(path, "/cursor") == 0 ||
@@ -178,13 +176,9 @@ static int op_getattr(const char *path, struct stat *st) {
 
 		if (strcmp(path, "/cursor") == 0) {
 			char tmp[64];
-			VisualPos cp =
-			    editor_byte_to_visual_pos(ed, ed->cursor_idx);
-			VisualPos sp = editor_byte_to_visual_pos(
-			    ed, ed->selection_anchor);
 			st->st_size =
-			    snprintf(tmp, sizeof(tmp), "%d\n%d",
-				     ed->cursor_idx, ed->selection_anchor);
+			    snprintf(tmp, sizeof(tmp), "%d\n%d", ed->cursor_idx,
+				     ed->selection_anchor);
 		} else if (strcmp(path, "/buffer/0/body") == 0) {
 			st->st_size = (off_t)ed->text.len;
 		} else if (strcmp(path, "/buffer/0/path") == 0) {
@@ -322,8 +316,8 @@ static int op_read(const char *path, char *buf, size_t size, off_t offset,
 	if (strcmp(path, "/cursor") == 0) {
 		editor_lock(ed);
 		char tmp[64];
-		int n = snprintf(tmp, sizeof(tmp), "%d %d\n",
-				 ed->cursor_idx, ed->selection_anchor);
+		int n = snprintf(tmp, sizeof(tmp), "%d %d\n", ed->cursor_idx,
+				 ed->selection_anchor);
 		editor_unlock(ed);
 
 		if (offset >= (off_t)n)