fixed prompt len function

This commit is contained in:
Maieul BOYER 2024-07-18 13:46:59 +02:00
parent 95f933c7c7
commit fa3208e33e
No known key found for this signature in database

View file

@ -6,7 +6,7 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */ /* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/11 18:21:45 by maiboyer #+# #+# */ /* Created: 2024/07/11 18:21:45 by maiboyer #+# #+# */
/* Updated: 2024/07/18 13:33:31 by maiboyer ### ########.fr */ /* Updated: 2024/07/18 13:46:22 by maiboyer ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -77,6 +77,5 @@ void line_refresh(t_line_state *state, t_line_flags flags)
me_printf_str(&str, "%s%s\x1b[0G\x1b[%uC", state->prompt, me_printf_str(&str, "%s%s\x1b[0G\x1b[%uC", state->prompt,
state->buf.buf, state->pos + line_get_prompt_len(state->prompt)); state->buf.buf, state->pos + line_get_prompt_len(state->prompt));
me_printf_fd(state->output_fd, "%s", str.buf); me_printf_fd(state->output_fd, "%s", str.buf);
//me_eprintf("prompt = %u | pos = %u",line_get_prompt_len(state->prompt) , state->pos);
string_free(str); string_free(str);
} }