◐ Shell
clean mode source ↗

Message 255251 - Python tracker

It seems to be the readline.redisplay() line that triggers the search mode. If I comment out that line, I am back to the 3.5 behaviour that adds extra lines.