changed some stuff with lineedit

This commit is contained in:
Maieul BOYER 2024-07-20 14:37:38 +02:00
parent 1d4fd27f97
commit 0cb2d91cac
No known key found for this signature in database
9 changed files with 95 additions and 139 deletions

View file

@ -6,7 +6,7 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/10 15:23:25 by maiboyer #+# #+# */
/* Updated: 2024/07/11 18:24:26 by maiboyer ### ########.fr */
/* Updated: 2024/07/20 13:52:23 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
@ -20,7 +20,7 @@
t_error line_edit_insert(t_line_state *state, char c);
t_error line_edit_start(t_line_state *state, t_fd *stdin_fd, t_fd *stdout_fd,
t_const_str prompt);
t_str line_edit_feed(t_line_state *state);
bool line_edit_feed(t_line_state *state, t_str *out);
void line_edit_backspace(t_line_state *state);
void line_edit_delete(t_line_state *state);
void line_edit_history_next(t_line_state *state, t_history_direction dir);

View file

@ -6,7 +6,7 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/10 15:37:40 by maiboyer #+# #+# */
/* Updated: 2024/07/10 15:48:56 by maiboyer ### ########.fr */
/* Updated: 2024/07/20 13:58:35 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
@ -30,7 +30,7 @@ t_error line_get_cursor_position(t_fd *input, t_fd *output,
t_u32 *column_out);
t_u32 line_get_columns(t_fd *input, t_fd *output);
t_usize line_get_prompt_len(t_const_str s);
t_str line_no_tty_impl(void);
bool line_no_tty_impl(t_str *out);
void line_print_key_codes(void);
t_error line_enable_raw_mode(t_fd *fd);

View file

@ -6,7 +6,7 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/10 15:24:34 by maiboyer #+# #+# */
/* Updated: 2024/07/10 15:53:54 by maiboyer ### ########.fr */
/* Updated: 2024/07/20 14:31:55 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
@ -71,6 +71,7 @@ enum e_key_action
K_CTRL_U = 21,
K_CTRL_W = 23,
K_ESC = 27,
K_SIGQUIT = 28,
K_BACKSPACE = 127
};