diff options
author | salad <fmoenne-@student.le-101.fr> | 2020-09-07 20:13:27 +0200 |
---|---|---|
committer | salad <fmoenne-@student.le-101.fr> | 2020-09-07 20:13:27 +0200 |
commit | 3ead2ff516490a87574347c7fd489330d5c7e8a7 (patch) | |
tree | 68968ccdddffe2cfd181a644746790261dbbde5d /src/c_init.c | |
parent | hoHOOOOOOOOO (diff) | |
download | 42-minishell-3ead2ff516490a87574347c7fd489330d5c7e8a7.tar.gz 42-minishell-3ead2ff516490a87574347c7fd489330d5c7e8a7.tar.bz2 42-minishell-3ead2ff516490a87574347c7fd489330d5c7e8a7.tar.xz 42-minishell-3ead2ff516490a87574347c7fd489330d5c7e8a7.tar.zst 42-minishell-3ead2ff516490a87574347c7fd489330d5c7e8a7.zip |
TODO tommorrow
Diffstat (limited to 'src/c_init.c')
-rw-r--r-- | src/c_init.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/c_init.c b/src/c_init.c index 9dde271..f4b130d 100644 --- a/src/c_init.c +++ b/src/c_init.c @@ -85,7 +85,7 @@ static int16_t } int16_t - c_process_key(t_msh *msh, char *buf) + c_process_key(char *buf, t_msh *msh, t_caps *tcaps) { int i; static char *line = NULL; @@ -129,6 +129,7 @@ int16_t } else if (strncmp(buf, tgetstr("kb", NULL), ft_strlen(tgetstr("kb", NULL))) == 0) { + c_delchar(line, tcaps); tputs(tgetstr("le", NULL), 1, ft_putchar); tputs(tgetstr("dc", NULL), 1, ft_putchar); return (1); @@ -159,7 +160,7 @@ int16_t c_init_tcaps(t_msh *msh) if (!(read(STDIN_FILENO, nread, 4))) return (0); tputs(tgetstr("vi", NULL), 1, ft_putchar); - ret = c_process_key(msh, nread); + ret = c_process_key(nread, msh, &tcaps); tputs(tgetstr("ve", NULL), 1, ft_putchar); } return (1); |