fix arrows in search

This commit is contained in:
2025-11-25 00:12:44 -08:00
parent 7245003769
commit 0c0c3d9ce5

4
main.c
View File

@@ -874,11 +874,13 @@ goto_line(void)
if (lineno < 1 || lineno >= editor.nrows) {
editor_set_status("Line number must be between 1 and %d.",
editor.nrows);
free(query);
return;
}
editor.cury = lineno - 1;
editor.rowoffs = editor.cury - (editor.rows / 2);
free(query);
}
@@ -1469,7 +1471,7 @@ editor_prompt(char *prompt, void (*cb)(char *, int16_t))
}
return buf;
}
} else if ((c == TAB_KEY) || (c >= 0x20 && c != 0x7f)) {
} else if ((c == TAB_KEY) || (c >= 0x20 && c < 0x7f)) {
if (buflen == bufsz - 1) {
bufsz *= 2;
buf = realloc(buf, bufsz);