This commit is contained in:
gazhonsepaskwa
2025-02-18 11:59:16 +01:00
parent 1d4b97ed9a
commit dcb9bde568
9 changed files with 50 additions and 48 deletions

View File

@@ -17,8 +17,8 @@ static void handle_input(char *in, t_msh *msh)
{
if (ft_strlen(in) > 0 && !is_only_space(in))
{
if (ft_strlen(in) != ft_strlen(msh->prev_input) ||
ft_strncmp(in, msh->prev_input, -1) != 0)
if (ft_strlen(in) != ft_strlen(msh->prev_input)
|| ft_strncmp(in, msh->prev_input, -1) != 0)
{
add_history(in);
ft_fprintf(msh->hist, "%s\n", in);