index — thing @ 5e6fe674c4c8947c13a6af1a8c13d7e29f5b0201

A little something I'm working on

main: header I guess
crispy-caesus crispy@crispy-caesus.eu
Thu, 06 Aug 2026 09:09:18 +0200
commit

5e6fe674c4c8947c13a6af1a8c13d7e29f5b0201

parent

72e15bf6fe06c5389d7d77799acbb0feabb92104

2 files changed, 8 insertions(+), 7 deletions(-)

jump to
M main.cmain.c

@@ -1,9 +1,4 @@

-#include <stdint.h> -#include <stdio.h> - -#include <poll.h> -#include <termios.h> -#include <unistd.h> +#include "main.h" void move_cursor(int direction, uint8_t *pos, int len) { if (direction == -1) {

@@ -78,7 +73,7 @@ else if (buffer[i] == 'j') {

move_cursor(1, &pos, len); } else if (buffer[i] == 'k') { move_cursor(-1, &pos, len); - } else if (buffer[i] == 'o') { + } else if (buffer[i] == '\n') { return pos; } }
A main.h

@@ -0,0 +1,6 @@

+#include <stdint.h> +#include <stdio.h> + +#include <poll.h> +#include <termios.h> +#include <unistd.h>