Repository: neovim
Issue: Cursor gets stuck on folds when scrolling down using 1<C-D>, but not when scrolling up using 1<C-U>
Labels: bug-vim,folds,needs:vim-patch

<!-- Before reporting: search existing issues and check the FAQ. -->

- `nvim --version`:
```
❯ nvim --version
NVIM v0.4.4
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim/src/build/config -I/build/neovim/src/neovim-0.4.4/src -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/src/build/include
Compiled by builduser

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info
```
- `vim -u DEFAULTS` (version: 8.2) behaves differently?
NO
- Operating system/version:
Arch Linux _derivative_
- Terminal name/version:
```
❯ kitty --version
kitty 0.19.1 created by Kovid Goyal
```
- `$TERM`:
```
❯ echo $TERM
xterm-kitty
```

### Steps to reproduce using `nvim -u NORC`

* `nvim -u NORC`
* `:set fdm=marker`
* Paste the following (random) text into the buffer -
```
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec pharetra
ante odio, nec accumsan sem cursus at. Vestibulum nec ligula eu tortor
ullamcorper elementum. Nam ultrices aliquam volutpat. Integer finibus {{{
amet risus. Nullam egestas, urna a pulvinar placerat, ligula ex egestas
turpis, quis fringilla lectus neque eget quam. Maecenas rhoncus neque ac
eleifend mattis. Duis imperdiet lorem in tincidunt feugiat. Nam convallis
sodales ipsum vitae hendrerit. Maecenas convallis, sapien vel mollis
congue, metus libero sollicitudin justo, feugiat finibus libero turpis
mattis sem. Fusce gravida justo non tortor vehicula elementum. Proin non
ipsum nec lorem ornare tincidunt vel in nulla. Suspendisse blandit purus
enim, sed aliquet augue tristique volutpat. Duis ornare, dui id egestas
sodales, justo libero faucibus neque, nec rutrum velit risus at arcu. }}}
enim ligula, euismod in tortor ut, rhoncus tempus urna. Fusce diam nisi,
faucibus eget imperdiet vitae, sollicitudin quis turpis.
nisl ac luctus semper, risus ex eleifend magna, eget vehicula risus nulla
a tellus. In in velit porttitor, vehicula augue finibus, facilisis mauris.
ullamcorper elementum. Nam ultrices aliquam volutpat. Integer finibus {{{
amet risus. Nullam egestas, urna a pulvinar placerat, ligula ex egestas
turpis, quis fringilla lectus neque eget quam. Maecenas rhoncus neque ac
eleifend mattis. Duis imperdiet lorem in tincidunt feugiat. Nam convallis
sodales ipsum vitae hendrerit. Maecenas convallis, sapien vel mollis
congue, metus libero sollicitudin justo, feugiat finibus libero turpis
mattis sem. Fusce gravida justo non tortor vehicula elementum. Proin non
ipsum nec lorem ornare tincidunt vel in nulla. Suspendisse blandit purus
enim, sed aliquet augue tristique volutpat. Duis ornare, dui id egestas
sodales, justo libero faucibus neque, nec rutrum velit risus at arcu. }}}
enim ligula, euismod in tortor ut, rhoncus tempus urna. Fusce diam nisi,
Ut sed consectetur mi. Curabitur vel volutpat diam. Etiam sem lectus,
lectus, ac condimentum neque. Nam et efficitur lacus. Nullam sed turpis
a tellus. In in velit porttitor, vehicula augue finibus, facilisis mauris.
ullamcorper elementum. Nam ultrices aliquam volutpat. Integer finibus {{{
amet risus. Nullam egestas, urna a pulvinar placerat, ligula ex egestas
turpis, quis fringilla lectus neque eget quam. Maecenas rhoncus neque ac
eleifend mattis. Duis imperdiet lorem in tincidunt feugiat. Nam convallis
sodales ipsum vitae hendrerit. Maecenas convallis, sapien vel mollis
congue, metus libero sollicitudin justo, feugiat finibus libero turpis
mattis sem. Fusce gravida justo non tortor vehicula elementum. Proin non
ipsum nec lorem ornare tincidunt vel in nulla. Suspendisse blandit purus
enim, sed aliquet augue tristique volutpat. Duis ornare, dui id egestas
sodales, justo libero faucibus neque, nec rutrum velit risus at arcu. }}}
enim ligula, euismod in tortor ut, rhoncus tempus urna. Fusce diam nisi,
Ut sed consectetur mi. Curabitur vel volutpat diam. Etiam sem lectus,
```
* <kbd>z</kbd><kbd>M</kbd> (To close all folds)
* Now copy and paste the above text into the buffer's end
* Repeat above step till the window is full of text
* Copy the whole buffer, and paste it at the end, so that now you have two windows' worth of text
<br>

* Position your cursor at the line just above a fold
* <kbd>1</kbd>  <kbd>Ctrl</kbd>+<kbd>D</kbd>
* Repeat above step 3 times
<br>

* <kbd>j</kbd><kbd>j</kbd> (To position the cursor at the line below the fold)
* <kbd>1</kbd>  <kbd>Ctrl</kbd>+<kbd>U</kbd>
* Repeat above step 3 times

### Actual behaviour
The cursor gets _stuck_ at the fold while scrolling down with <kbd>Ctrl</kbd>+<kbd>D</kbd>, but not when scrolling up with <kbd>Ctrl</kbd>+<kbd>U</kbd>

### Expected behaviour
Cursor does not get _stuck_ in either case