]> www.ljiriste.work Git - FET_sim.git/commitdiff
Remove check that ncurses made obsolete trunk
authorLukáš Jiřiště <redacted>
Fri, 25 Sep 2026 17:03:30 +0000 (19:03 +0200)
committerLukáš Jiřiště <redacted>
Fri, 25 Sep 2026 17:03:30 +0000 (19:03 +0200)
This check was to differentiate empty line and CTRL-D. Ncurses does not
work the same way (or at least wgetnstr does not) and the check is
unnecessary.

src/terminal.c

index c54e7bcf1ddfbdddab56c207a9148e4d661f2784..f66d2f4f2f19cf54258296cad7d2e89868778f60 100644 (file)
@@ -55,8 +55,6 @@ int   get_input(WINDOW *command_win, t_input *input)
                input->argc = 0;
                return (1);
        }
-       if (str_inp[0] == '\n')
-               return (1);
        if (str_inp[0] && str_inp[ft_strlen(str_inp) - 1] == '\n')
                str_inp[ft_strlen(str_inp) - 1] = '\0';
        split_inp = ft_split(str_inp, " ");