copy paste functions
Build project / build (push) Has been cancelled

This commit is contained in:
2026-05-26 08:28:38 +02:00
parent 777dc5cb74
commit 3d49a0e2eb
23 changed files with 369 additions and 288 deletions
+4 -2
View File
@@ -46,7 +46,7 @@ void enableRawMode() {
#include <ctype.h> /* isprint */
char *key_to_string(int key) {
char *keyToString(int key) {
static char key_str[32];
if (key == '\r') {
@@ -111,7 +111,7 @@ int editorReadKey() {
/* read first byte — may be start of UTF-8 or escape */
while (read(STDIN_FILENO, &c, 1) != 1)
;
appDebug("f : %X\r\n", c);
appDebug("f : %hhu %ld\r\n", c, 0x200);
if (c == '\x1b') {
char seq[6];
@@ -120,6 +120,8 @@ int editorReadKey() {
return '\x1b';
if (read(STDIN_FILENO, &seq[1], 1) != 1)
return '\x1b';
appDebug("f2 : %s\r\n", seq);
if (seq[0] == '[') {
if (seq[1] >= '0' && seq[1] <= '9') {
if (read(STDIN_FILENO, &seq[2], 1) != 1)