Marco Hinz пре 12 година
родитељ
комит
7d9de812ac
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3 3
      plugin/startify.vim

+ 3 - 3
plugin/startify.vim

@@ -99,13 +99,13 @@ endfunction
 function! s:set_cursor() abort
   let s:line_old = exists('s:line_new') ? s:line_new : 5
   let s:line_new = line('.')
-  if empty(getline('.'))
+  if empty(getline(s:line_new))
     if s:line_new > s:line_old
-      call cursor(s:line_new + 1, 5) " going down
       let s:line_new += 1
+      call cursor(s:line_new, 5) " going down
     else
-      call cursor((s:line_new < 4 ? 4 : s:line_new - 1), 5) " going up
       let s:line_new -= 1
+      call cursor((s:line_new < 4 ? 4 : s:line_new), 5) " going up
     endif
   else
     call cursor((s:line_new < 4 ? 4 : 0), 5) " hold cursor in column