Diff options
Diffstat (limited to '')
| -rw-r--r-- | source/ui-diff.c | 10 |
1 file changed, 1 insertion, 9 deletions
diff --git a/source/ui-diff.c b/source/ui-diff.c index 260aed2..58df894 100644 --- a/source/ui-diff.c +++ b/source/ui-diff.c @@ -187,15 +187,9 @@ static int show_filepair(struct diff_filepair *pair) starts_with(pair->two->path, current_prefix); } -/* - * The line xdiff produces ends in its newline, which is swapped for a - * terminator while the text is escaped and then put back, because the line - * points into a buffer xdiff still owns. - */ static void print_line(char *line, int len) { const char *class = "ctx"; - char c = line[len - 1]; if (line[0] == '+') class = "add"; @@ -205,10 +199,8 @@ static void print_line(char *line, int len) class = "hunk"; htmlf("<div class='%s'>", class); - line[len - 1] = '\0'; - html_txt(line); + html_ntxt(line, len - 1); html("</div>"); - line[len - 1] = c; } static void print_file_header(const struct object_id *old_oid, const char *old_path, unsigned old_mode, |
