edit: Fix history prev selection
This commit is contained in:
parent
8953e9681a
commit
19ec1f262e
1 changed files with 7 additions and 4 deletions
|
@ -217,9 +217,7 @@ static void history_use(void)
|
||||||
|
|
||||||
static void history_prev(void)
|
static void history_prev(void)
|
||||||
{
|
{
|
||||||
if (history_curr == NULL ||
|
if (history_curr == NULL)
|
||||||
history_curr ==
|
|
||||||
dl_list_last(&history_list, struct edit_history, list))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (history_curr ==
|
if (history_curr ==
|
||||||
|
@ -228,9 +226,14 @@ static void history_prev(void)
|
||||||
history_add(cmdbuf);
|
history_add(cmdbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
history_use();
|
||||||
|
|
||||||
|
if (history_curr ==
|
||||||
|
dl_list_last(&history_list, struct edit_history, list))
|
||||||
|
return;
|
||||||
|
|
||||||
history_curr = dl_list_entry(history_curr->list.next,
|
history_curr = dl_list_entry(history_curr->list.next,
|
||||||
struct edit_history, list);
|
struct edit_history, list);
|
||||||
history_use();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue