mirror of
https://github.com/Tha14/toxic.git
synced 2025-07-01 10:46:45 +02:00
small improvement
This commit is contained in:
@ -116,11 +116,16 @@ void fetch_hist_item(wchar_t *buf, size_t *pos, size_t *len, wchar_t (*hst)[MAX_
|
||||
int hst_tot, int *hst_pos, int key_dir)
|
||||
{
|
||||
if (key_dir == LN_HIST_MV_UP) {
|
||||
if (--(*hst_pos) < 0)
|
||||
if (--(*hst_pos) < 0) {
|
||||
++(*hst_pos);
|
||||
beep();
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (++(*hst_pos) == hst_tot)
|
||||
--(*hst_pos);
|
||||
if (++(*hst_pos) == hst_tot) {
|
||||
discard_buf(buf, pos, len);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const wchar_t *hst_line = hst[*hst_pos];
|
||||
|
Reference in New Issue
Block a user