When the user interrupts by calling Ctrl+c, while the program is writing sliding logs, the result is wrong: previous logs are replaced by the sliding logs, part of the sliding logs are half removed, the prompt is in the middle of half removed logs:
This PR fixes this by removing the clear_logs from the things that are executed at the end even in case of interruption:
I am not completely sure why the former behavior happened consistently (it is like clear_logs was running twice), and how we could achieve what was wanted before (that the sliding logs are removed in case of user interruption), but I think it is good to keep the sliding logs in case of user interruption.
When the user interrupts by calling Ctrl+c, while the program is writing sliding logs, the result is wrong: previous logs are replaced by the sliding logs, part of the sliding logs are half removed, the prompt is in the middle of half removed logs:
This PR fixes this by removing the
clear_logs
from the things that are executed at the end even in case of interruption:I am not completely sure why the former behavior happened consistently (it is like
clear_logs
was running twice), and how we could achieve what was wanted before (that the sliding logs are removed in case of user interruption), but I think it is good to keep the sliding logs in case of user interruption.