If "clear" is set to true, we simply clear the line and close. If it isn't, the bar stays visible, but we need to move the cursor to the next line