From 481821a88d55281a533703558af844f0f65b1120 Mon Sep 17 00:00:00 2001 From: M600 Date: Thu, 16 Feb 2017 16:01:44 +0100 Subject: [PATCH] Fix crash c[tab]d[tab] --- 42sh/src/completion/c_rematch.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/42sh/src/completion/c_rematch.c b/42sh/src/completion/c_rematch.c index 87acbcf2..e2885af4 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:31:40 by alao ### ########.fr */ +/* Updated: 2017/02/16 16:01:12 by alao ### ########.fr */ /* */ /* ************************************************************************** */ @@ -64,6 +64,13 @@ int c_rematch(t_comp *c, long int keypress) // } return (1); } + if (c->lst == NULL) + { + DG("Clear"); + c_clear(data_singleton()); +// data_singleton()->line.pos += 1; + return (1); + } } return (0); }