fix arrows in search
This commit is contained in:
4
main.c
4
main.c
@@ -874,11 +874,13 @@ goto_line(void)
|
|||||||
if (lineno < 1 || lineno >= editor.nrows) {
|
if (lineno < 1 || lineno >= editor.nrows) {
|
||||||
editor_set_status("Line number must be between 1 and %d.",
|
editor_set_status("Line number must be between 1 and %d.",
|
||||||
editor.nrows);
|
editor.nrows);
|
||||||
|
free(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
editor.cury = lineno - 1;
|
editor.cury = lineno - 1;
|
||||||
editor.rowoffs = editor.cury - (editor.rows / 2);
|
editor.rowoffs = editor.cury - (editor.rows / 2);
|
||||||
|
free(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1469,7 +1471,7 @@ editor_prompt(char *prompt, void (*cb)(char *, int16_t))
|
|||||||
}
|
}
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
} else if ((c == TAB_KEY) || (c >= 0x20 && c != 0x7f)) {
|
} else if ((c == TAB_KEY) || (c >= 0x20 && c < 0x7f)) {
|
||||||
if (buflen == bufsz - 1) {
|
if (buflen == bufsz - 1) {
|
||||||
bufsz *= 2;
|
bufsz *= 2;
|
||||||
buf = realloc(buf, bufsz);
|
buf = realloc(buf, bufsz);
|
||||||
|
|||||||
Reference in New Issue
Block a user