1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-25 09:00:05 +08:00

Merge pull request #1391 from kiooss/fix_zz_mapping

fix zz mapping does not respect scrolloff value.
This commit is contained in:
Wang Shidong 2018-02-08 08:24:21 -06:00 committed by GitHub
commit 8486bd5e43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -216,7 +216,7 @@ function! SpaceVim#default#SetMappings() abort
" Improve scroll, credits: https://github.com/Shougo
nnoremap <expr> zz (winline() == (winheight(0)+1) / 2) ?
\ 'zt' : (winline() == 1) ? 'zb' : 'zz'
\ 'zt' : (winline() == &scrolloff + 1) ? 'zb' : 'zz'
noremap <expr> <C-f> max([winheight(0) - 2, 1])
\ ."\<C-d>".(line('w$') >= line('$') ? "L" : "H")
noremap <expr> <C-b> max([winheight(0) - 2, 1])