bugfix: ensure definition to edit has some name

This commit is contained in:
Kartik K. Agaram 2021-12-21 21:18:16 -08:00
parent 7cf65a3bea
commit 712d80e48a
1 changed files with 6 additions and 4 deletions

View File

@ -1012,10 +1012,12 @@ restart:
} else if (c == CTRL_X) {
return;
} else if (c == ENTER) {
save_to_current_definition_and_editor_buffer(L, query);
int back_to_big_picture = edit_current_definition(L);
if (back_to_big_picture) goto restart;
return;
if (query[0] != '\0') {
save_to_current_definition_and_editor_buffer(L, query);
int back_to_big_picture = edit_current_definition(L);
if (back_to_big_picture) goto restart;
return;
}
} else if (c == CTRL_U) {
qlen = 0;
query[qlen] = '\0';