Add \n to buf contents passed to git-diff

Attempts to fix #3
This commit is contained in:
Lewis Russell 2020-11-03 13:29:53 +00:00
parent 1ee577246b
commit 36f1b519ef
1 changed files with 1 additions and 1 deletions

View File

@ -216,7 +216,7 @@ local run_diff = function(staged, text, callback)
-- pipe, it stops reading at line ~278. Some internal buffer limit?. To
-- workaround this we pass the file as a single string by concatenating
-- all the lines.
writer = table.concat(text, '\n'),
writer = table.concat(text, '\n')..'\n',
on_stdout = function(_, line, _)
if vim.startswith(line, '@@') then
table.insert(results, parse_diff_line(line))