Hi,

Basically as the title says, here's how to reproduce this:

1. start Emacs with -Q;

2. evaluate this sexp:

   (progn
     (custom-set-variables
      '(scroll-step 1)
      '(scroll-margin 0))
     (with-current-buffer (switch-to-buffer "test")
       (insert (make-string 100 ?\n)
      (propertize "XXX" 'face '(:height 2.0))
      (make-string 100 ?\n))))

3. in the newly created buffer press and keep pressed <up>.

You'll notice that the point moves to the top of the window and stays there, but as soon as it *steps* over "XXX", the point is centered.

This is pretty annoying in my case where I use big headings in Markdown mode.

This happens, at least, in Emacs 25.1.1, 24.5.1 and 26.2 on Linux. Please let me know if you need additional details.


Best,

Andrea