فهرست منبع

Fix git version detection

Try to ensure that only the 3 dotted number is captured.
Weiyi Lou 9 سال پیش
والد
کامیت
4999cbf930
2فایلهای تغییر یافته به همراه9 افزوده شده و 1 حذف شده
  1. 1 1
      shell/common/vars
  2. 8 0
      vim/autoload/plug.vim

+ 1 - 1
shell/common/vars

@@ -5,4 +5,4 @@ TERM="xterm-256color"
 
 # Git version string
 GIT_VER=$(git --version 2>/dev/null)
-GIT_VER=${GIT_VER:12}
+GIT_VER=${GIT_VER:12:5}

+ 8 - 0
vim/autoload/plug.vim

@@ -493,6 +493,13 @@ function! s:lod_map(map, names, prefix)
     endif
     let extra .= nr2char(c)
   endwhile
+  if v:count
+    call feedkeys(v:count, 'n')
+  endif
+  call feedkeys('"'.v:register, 'n')
+  if mode(1) == 'no'
+    call feedkeys(v:operator)
+  endif
   call feedkeys(a:prefix . substitute(a:map, '^<Plug>', "\<Plug>", '') . extra)
 endfunction
 
@@ -786,6 +793,7 @@ function! s:do(pull, force, todo)
       else
         let error = 'Invalid hook type'
       endif
+      call s:switch_in()
       call setline(4, empty(error) ? (getline(4) . 'OK')
                                  \ : ('x' . getline(4)[1:] . error))
       if !empty(error)