Don't omit final line feed when copying diff lines to clipboard

This commit is contained in:
stk 2023-01-25 21:36:43 +01:00
parent 93d845cb01
commit fc38e3b54d

View file

@ -210,10 +210,10 @@ func (p *PatchParser) RenderLinesPlain(firstLineIndex, lastLineIndex int) string
func renderLinesPlain(lines []*PatchLine) string {
renderedLines := slices.Map(lines, func(line *PatchLine) string {
return line.Content
return line.Content + "\n"
})
return strings.Join(renderedLines, "\n")
return strings.Join(renderedLines, "")
}
// GetNextStageableLineIndex takes a line index and returns the line index of the next stageable line