[readline] fix a problem with scrolling through the match list