From 7f7f5e8084e67b4c3885b2da3d341fd0025a5932 Mon Sep 17 00:00:00 2001 From: M600 Date: Thu, 16 Feb 2017 15:32:11 +0100 Subject: [PATCH] Rebase --- 42sh/src/completion/c_rematch.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/42sh/src/completion/c_rematch.c b/42sh/src/completion/c_rematch.c index fcb4c121..87acbcf2 100644 --- a/42sh/src/completion/c_rematch.c +++ b/42sh/src/completion/c_rematch.c @@ -6,7 +6,7 @@ /* By: alao +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 12:03:30 by alao #+# #+# */ -/* Updated: 2017/02/16 15:17:52 by alao ### ########.fr */ +/* Updated: 2017/02/16 15:31:40 by alao ### ########.fr */ /* */ /* ************************************************************************** */ @@ -30,6 +30,7 @@ static int c_refresh_match(t_comp *c, long int keypress) tmp = ft_strjoin(c->rcmd, kpconv); c->rcmd ? ft_memdel((void *)&c->rcmd) : (0); c->rcmd = ft_strdup(tmp); + c->ircmd++; tmp ? ft_memdel((void *)&tmp) : (0); return (0); } @@ -50,11 +51,19 @@ int c_rematch(t_comp *c, long int keypress) if (ft_isascii(keypress)) { c_term_clear(c); + ft_putchar(keypress); c_refresh_match(c, keypress); c_clear_lst(c); c->lst = NULL; if (c_matching(data_singleton(), c)) + { +// if (c->lst) +// { +// ft_putstr(tgetstr("le", NULL)); +// ft_putstr(tgetstr("nd", NULL)); +// } return (1); + } } return (0); }