Skip to content

Commit

Permalink
Fix fatal file length messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
black-desk committed Jan 10, 2022
1 parent f4eb22a commit ffff3bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion autoload/blamer.vim
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ let g:blamer_autoloaded = 1
let s:save_cpo = &cpoptions
set cpoptions&vim

let s:buffer = tempname()
let s:blamer_prefix = get(g:, 'blamer_prefix', ' ')
let s:blamer_template = get(g:, 'blamer_template', '<author>, <author-time> • <summary>')
let s:blamer_date_format = get(g:, 'blamer_date_format', '%d/%m/%y %H:%M')
Expand Down Expand Up @@ -126,7 +127,8 @@ function! blamer#GetMessages(file, line_number, line_count) abort
let l:dir_path = shellescape(s:substitute_path_separator(expand('%:h')))
let l:end_line = a:line_number + a:line_count - 1
let l:file_path_escaped = shellescape(a:file)
let l:command = 'git -C ' . l:dir_path . ' --no-pager blame --line-porcelain -L ' . a:line_number . ',' . l:end_line . ' -- ' . l:file_path_escaped
silent execute 'write!' fnameescape(s:buffer)
let l:command = 'git -C ' . l:dir_path . ' --no-pager blame --line-porcelain -L ' . a:line_number . ',' . l:end_line . ' --contents ' . s:buffer . ' -- ' . l:file_path_escaped
let l:result = system(l:command)
let l:lines = split(l:result, '\n')

Expand Down

0 comments on commit ffff3bb

Please sign in to comment.