Skip to content

Commit

Permalink
bug修复
Browse files Browse the repository at this point in the history
  • Loading branch information
min0911Y committed Dec 12, 2024
1 parent 1a7f12f commit 17dcfad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plreadln.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ int pl_readline_handle_key(_self, int ch) {
self->pl_readline_hal_putch('\n');
self->buffer[self->length] = '\0';
self->history_idx = 0;
pl_readline_modify_history(self);
if(self->buffer[0] != '\0') {
pl_readline_modify_history(self);
pl_readline_add_history(self, "");
}
return PL_READLINE_SUCCESS;
Expand Down

0 comments on commit 17dcfad

Please sign in to comment.