42-archive/42sh/OLD/OLD_RL/rl_select_wleft_function.c.old
2016-12-12 13:15:47 +01:00

27 lines
1.2 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* rl_select_left_function.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: sbenning <sbenning@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/09 03:06:59 by sbenning #+# #+# */
/* Updated: 2016/12/10 12:09:03 by sbenning ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_readline.h"
int rl_select_wleft_function(t_line *line, long int input)
{
int ret;
if (!line->pos)
return (0);
if (RL_NOT(line->bitset, RL_SELECT))
line->select = line->pos;
ret = rl_wleft_function(line, input);
RL_SET(line->bitset, RL_SELECT);
rl_reset_display_post(line);
return (ret);
}