readline: Reset offset when top command is issued repeateadly
This commit is contained in:
parent
82ed7bf5b1
commit
b843486386
@ -708,13 +708,14 @@ ssize_t readline_common(FAR struct rl_common_s *vtbl, FAR char *buf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_cmdhist.buf[g_cmdhist.head][i] = '\0';
|
g_cmdhist.buf[g_cmdhist.head][i] = '\0';
|
||||||
g_cmdhist.offset = 1;
|
|
||||||
|
|
||||||
if (g_cmdhist.len < RL_CMDHIST_LEN)
|
if (g_cmdhist.len < RL_CMDHIST_LEN)
|
||||||
{
|
{
|
||||||
g_cmdhist.len++;
|
g_cmdhist.len++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_cmdhist.offset = 1;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_READLINE_CMD_HISTORY */
|
#endif /* CONFIG_READLINE_CMD_HISTORY */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user