~nloomans/ft_select

0eb31b5bbdfbd6ff2161d184fee54187dd0d0faf — Noah Loomans a month ago fc802a7
fix abstract art being displayed after render error message

This bug can be reproduced by first making the screen big enough to
display options and then making it smaller to display an error. The text
after the error message isn't cleared. This regression has been
introduced in 58e0f76 ("fix render norm").
1 files changed, 4 insertions(+), 1 deletions(-)

M src/render.c
M src/render.c => src/render.c +4 -1
@@ 74,7 74,6 @@ t_error		render_with_error(const struct s_state state)
	struct s_state_option		***rows;
	t_error						error;

	terminal_send(TERMINAL_CURSOR_HOME);
	error = derive_dimensions(&dimensions, state.terminal, state.options);
	if (is_error(error))
		return (error);


@@ 96,7 95,11 @@ void		render(const struct s_state state)
{
	t_error						error;

	terminal_send(TERMINAL_CURSOR_HOME);
	error = render_with_error(state);
	if (is_error(error))
	{
		terminal_send(TERMINAL_CLEAR_SCREEN);
		ft_dprintf(STDERR_FILENO, "%s", error.msg);
	}
}