fix de quelques problemes sur la completion qui tranaient...
This commit is contained in:
parent
8e4a3c17a8
commit
316194d860
2 changed files with 2 additions and 8 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: alao <alao@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2017/01/09 11:21:16 by alao #+# #+# */
|
||||
/* Updated: 2017/03/21 11:39:22 by gwojda ### ########.fr */
|
||||
/* Updated: 2017/03/22 14:21:51 by gwojda ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -36,8 +36,6 @@ static char *c_trimmer(char *cmd, int st, int nd)
|
|||
rt = ft_strsub(cmd, st, nd - st);
|
||||
data_singleton()->comp->cutpoint = st;
|
||||
st = 0;
|
||||
while (rt[st] == ' ')
|
||||
st++;
|
||||
tmp = ft_strsub(rt, st, ft_strlen(rt) - st);
|
||||
if (st)
|
||||
data_singleton()->comp->between = ft_strsub(rt, 0, st);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: alao <alao@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2016/10/15 13:27:14 by alao #+# #+# */
|
||||
/* Updated: 2017/03/22 12:58:21 by gwojda ### ########.fr */
|
||||
/* Updated: 2017/03/22 14:21:45 by gwojda ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -43,12 +43,8 @@ static int c_chevron(t_comp *c)
|
|||
static char *c_current_words(t_comp *c)
|
||||
{
|
||||
size_t pos;
|
||||
size_t input_len;
|
||||
|
||||
pos = c->ircmd;
|
||||
input_len = ft_strlen(data_singleton()->line.input);
|
||||
if (pos >= ft_strlen(c->rcmd))
|
||||
pos = ft_strlen(c->rcmd) - (input_len - pos + 1);
|
||||
while (pos && c->rcmd[pos] != ' ' && c->rcmd[pos] != '<'
|
||||
&& c->rcmd[pos] != '>' && c->rcmd[pos] != '\n')
|
||||
--pos;
|
||||
|
|
|
|||
Loading…
Reference in a new issue