diff options
Diffstat (limited to '')
-rw-r--r-- | src/c_input.c | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/src/c_input.c b/src/c_input.c index 2435e4a..ed60ae4 100644 --- a/src/c_input.c +++ b/src/c_input.c @@ -22,24 +22,6 @@ int16_t - c_new_line(char *buf, - char **line, - t_msh *msh, - t_caps *tcaps) -{ - write(1, buf, ft_strlen(buf)); - tputs(tgetstr("cr", NULL), 1, ft_putchar); - c_set_term_raw(0); - m_parse_and_run_line(*line, msh); - *line = NULL; - tcaps->cpos = 0; - tputs(tgetstr("cr", NULL), 1, ft_putchar); - c_set_term_raw(1); - m_prompt_psx(1, msh); - return (1); -} - -int16_t c_back_slash(char **line, t_caps *tcaps) { @@ -65,6 +47,17 @@ int16_t } int16_t + c_ctrl_c(char *line, + t_caps *tcaps, + t_msh *msh) +{ + tputs(tgetstr("cl", NULL), 1, ft_putchar); + m_prompt_psx(1, msh); + c_redraw_line(line, tcaps->cpos, msh); + return (1); +} + +int16_t c_home_key(t_caps *tcaps) { uint16_t i; @@ -94,7 +87,6 @@ int16_t return (1); } - int16_t c_key_right(uint32_t len, t_caps *tcaps) |