completion semble fonctionnelle : plus de tests a faire ! :)
This commit is contained in:
parent
6ab0634d4c
commit
2d6b314a68
2 changed files with 6 additions and 7 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: alao <alao@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2017/02/03 13:10:38 by alao #+# #+# */
|
||||
/* Updated: 2017/02/03 15:47:16 by alao ### ########.fr */
|
||||
/* Updated: 2017/02/03 16:12:00 by gwojda ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -58,7 +58,7 @@ int c_gtfo(t_comp *c, long int keypress)
|
|||
if (keypress != 10)
|
||||
{
|
||||
c_clear(data_singleton());
|
||||
return (0);
|
||||
return (1);
|
||||
}
|
||||
ptr = c->lst;
|
||||
while (!ptr->cursor)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: gwojda <gwojda@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2017/02/03 14:15:55 by gwojda #+# #+# */
|
||||
/* Updated: 2017/02/03 15:39:40 by gwojda ### ########.fr */
|
||||
/* Updated: 2017/02/03 16:10:54 by gwojda ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -18,16 +18,15 @@ int ft_completion(int ret)
|
|||
char boolean;
|
||||
|
||||
boolean = 0;
|
||||
if ((ret != TOUCHE_TAB && ret != 10)
|
||||
|| (ret == 10 && !(data_singleton()->comp)))
|
||||
if (((ret != TOUCHE_TAB && ret != 10)
|
||||
|| (ret == 10)) && !(data_singleton()->comp))
|
||||
return (0);
|
||||
tmp = data_singleton()->line.pos;
|
||||
if (ret == 10)
|
||||
ft_puttermcaps("cd");
|
||||
if (data_singleton()->comp || ret == TOUCHE_TAB)
|
||||
boolean = completion(ret);
|
||||
if (boolean || ret == 10)
|
||||
{
|
||||
ft_puttermcaps("cd");
|
||||
ft_current_str(data_singleton()->line.input, tmp);
|
||||
ft_get_next_str(data_singleton()->line.input, &tmp);
|
||||
data_singleton()->line.pos = tmp;
|
||||
|
|
|
|||
Loading…
Reference in a new issue