xC: fix Readline 6.3 compatibility

This commit is contained in:
Přemysl Eric Janouch 2023-07-24 07:58:59 +02:00
parent c157d3369f
commit 100de5ac2d
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 1 additions and 1 deletions

2
xC.c
View File

@ -616,7 +616,7 @@ input_rl_buffer_add_history (void *input, input_buffer_t input_buffer,
// or temporarily switch histories. // or temporarily switch histories.
if (!buffer->history) if (!buffer->history)
{ {
bool at_end = history_offset == history_length; bool at_end = where_history () == history_length;
add_history (line); add_history (line);
if (at_end) if (at_end)
next_history (); next_history ();