Fix bug #10170 with extra scrolling after C-s.