/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* rl_remove_function.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: sbenning +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/12 12:45:08 by sbenning #+# #+# */ /* Updated: 2016/12/12 12:46:39 by sbenning ### ########.fr */ /* */ /* ************************************************************************** */ #include "ft_readline.h" int rl_retarr_function(t_line *line, long int input) { if (RL_IS(line->bitset, RL_SELECT)) RL_UNSET(line->bitset, RL_SELECT); if (!line->pos) return (0); input_remove(line, 1); curs_backward(&line->curs, 1); line->pos -= 1; rl_reset_display_post(line); return (0); (void)input; } int rl_suppr_function(t_line *line, long int input) { if (RL_IS(line->bitset, RL_SELECT)) RL_UNSET(line->bitset, RL_SELECT); if (line->pos == line->used) return (0); input_remove(line, -1); rl_reset_display_post(line); return (0); (void)input; }