line-move-ignore-invisible

line-move-ignore-invisible is a variable defined in `simple.el'.
Its value is
t


Documentation:
Non-nil means commands that move by lines ignore invisible newlines.
When this option is non-nil, C-n, C-p, C-e, and C-a behave
as if newlines that are invisible didn't exist, and count
only visible newlines. Thus, moving across across 2 newlines
one of which is invisible will be counted as a one-line move.
Also, a non-nil value causes invisible text to be ignored when
counting columns for the purposes of keeping point in the same
column by C-n and C-p.

Outline mode sets this.

You can customize this variable.