diff --git a/42sh/src/line-editing/lib_line_editing/toolz_termcaps.c b/42sh/src/line-editing/lib_line_editing/toolz_termcaps.c index 637b5aef..58e7d6ac 100644 --- a/42sh/src/line-editing/lib_line_editing/toolz_termcaps.c +++ b/42sh/src/line-editing/lib_line_editing/toolz_termcaps.c @@ -6,7 +6,7 @@ /* By: gwojda +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/01/08 12:35:11 by gwojda #+# #+# */ -/* Updated: 2017/02/14 11:13:10 by gwojda ### ########.fr */ +/* Updated: 2017/02/28 11:11:26 by gwojda ### ########.fr */ /* */ /* ************************************************************************** */ @@ -35,6 +35,8 @@ int ft_get_size_prev(char *str, size_t pos) --pos; ++len; } + if (str[pos] == '\n') + --len; return (len); }