My tests show that scroll-conservatively does the job, need your feedback on this. See https://github.com/syl20bnr/spacemacs/issues/6097
Also replace lambdas by named functions