There seems to be a bug with clean-up of multi-line prompt, as it leaves most of the old text on screen and renders clean-up template underneath (running on MacOS with iTerm2). This PR seems to fix the issue in my case, hoping that it does not introduce other side-effects elsewhere in other prompts or scenarios. I would be happy to add a test for that, but I'm really not clear on how to test clean-up rendering.
There seems to be a bug with clean-up of multi-line prompt, as it leaves most of the old text on screen and renders clean-up template underneath (running on MacOS with iTerm2). This PR seems to fix the issue in my case, hoping that it does not introduce other side-effects elsewhere in other prompts or scenarios. I would be happy to add a test for that, but I'm really not clear on how to test clean-up rendering.