Procházet zdrojové kódy

Don't overwrite the last regular entry with [q]

Marco Hinz před 10 roky
rodič
revize
61cfce000c
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 4 1
      autoload/startify.vim

+ 4 - 1
autoload/startify.vim

@@ -117,8 +117,11 @@ function! startify#insane_in_the_membrane() abort
 
   if s:show_special
     call append('$', ['', '   [q]  <quit>'])
+    call s:register(line('$'), 'q', 'special', 'call s:close()', '')
+  else
+    " Don't overwrite the last regular entry, thus +1
+    call s:register(line('$')+1, 'q', 'special', 'call s:close()', '')
   endif
-  call s:register(line('$'), 'q', 'special', 'call s:close()', '')
 
   " compute first line offset
   let s:firstline = 2