mirror of
https://github.com/amix/vimrc
synced 2025-07-26 22:45:00 +08:00
Merge branch 'pr/2'
This commit is contained in:
@ -4,7 +4,11 @@ let s:hunk_re = '^@@ -\(\d\+\),\?\(\d*\) +\(\d\+\),\?\(\d*\) @@'
|
||||
|
||||
" True for git v1.7.2+.
|
||||
function! s:git_supports_command_line_config_override() abort
|
||||
<<<<<<< HEAD
|
||||
call system(g:gitgutter_git_executable.' '.g:gitgutter_git_args.' -c foo.bar=baz --version')
|
||||
=======
|
||||
call gitgutter#utility#system(g:gitgutter_git_executable.' '.g:gitgutter_git_args.' -c foo.bar=baz --version')
|
||||
>>>>>>> 27ad0d07862847896f691309a544a206783c94d6
|
||||
return !v:shell_error
|
||||
endfunction
|
||||
|
||||
@ -187,7 +191,7 @@ function! gitgutter#diff#handler(bufnr, diff) abort
|
||||
call gitgutter#sign#clear_signs(a:bufnr)
|
||||
|
||||
else
|
||||
if g:gitgutter_signs || g:gitgutter_highlight_lines
|
||||
if g:gitgutter_signs || g:gitgutter_highlight_lines || g:gitgutter_highlight_linenrs
|
||||
call gitgutter#sign#update_signs(a:bufnr, modified_lines)
|
||||
endif
|
||||
endif
|
||||
@ -385,6 +389,10 @@ function! s:write_buffer(bufnr, file)
|
||||
call map(bufcontents, 'v:val."\r"')
|
||||
endif
|
||||
|
||||
if getbufvar(a:bufnr, '&endofline')
|
||||
call add(bufcontents, '')
|
||||
endif
|
||||
|
||||
let fenc = getbufvar(a:bufnr, '&fileencoding')
|
||||
if fenc !=# &encoding
|
||||
call map(bufcontents, 'iconv(v:val, &encoding, "'.fenc.'")')
|
||||
@ -394,7 +402,7 @@ function! s:write_buffer(bufnr, file)
|
||||
let bufcontents[0]=''.bufcontents[0]
|
||||
endif
|
||||
|
||||
call writefile(bufcontents, a:file)
|
||||
call writefile(bufcontents, a:file, 'b')
|
||||
endfunction
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user