From 0b47dd9220f3051afb3bd021c2c71f1ac1054ca2 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Thu, 8 Feb 2018 15:33:55 +0900 Subject: [PATCH] fix zz mapping does not respect scrolloff value. --- autoload/SpaceVim/default.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/SpaceVim/default.vim b/autoload/SpaceVim/default.vim index 6c8f72463..6ccc9bd86 100644 --- a/autoload/SpaceVim/default.vim +++ b/autoload/SpaceVim/default.vim @@ -216,7 +216,7 @@ function! SpaceVim#default#SetMappings() abort " Improve scroll, credits: https://github.com/Shougo nnoremap zz (winline() == (winheight(0)+1) / 2) ? - \ 'zt' : (winline() == 1) ? 'zb' : 'zz' + \ 'zt' : (winline() == &scrolloff + 1) ? 'zb' : 'zz' noremap max([winheight(0) - 2, 1]) \ ."\".(line('w$') >= line('$') ? "L" : "H") noremap max([winheight(0) - 2, 1])