diff options
Diffstat (limited to '')
-rw-r--r-- | src/c_input.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/c_input.c b/src/c_input.c index f92a784..2435e4a 100644 --- a/src/c_input.c +++ b/src/c_input.c @@ -59,11 +59,43 @@ int16_t 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; + + i = tcaps->cpos; + while (i > 0) + { + tputs(tgetstr("le", NULL), 1, ft_putchar); + i--; + } + tcaps->cpos = 0; + return (1); +} + +int16_t + c_end_key(uint16_t size, t_caps *tcaps) +{ + uint16_t i; + + i = tcaps->cpos; + while (i < size) + { + tputs(tgetstr("nd", NULL), 1, ft_putchar); + i++; + } + tcaps->cpos = size; + return (1); +} + + +int16_t c_key_right(uint32_t len, t_caps *tcaps) { |