Skip to content

Commit

Permalink
[dump] Check for end of link at the end of loop, not at the begining …
Browse files Browse the repository at this point in the history
…(off by one). Refs #198
  • Loading branch information
rkd77 committed Nov 28, 2022
1 parent 8e619e4 commit 023991e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/viewer/dump/dump-specialized.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ DUMP_FUNCTION_SPECIALIZED(struct document *document, struct dump_output *out)
if (is_start_of_link(document, x, y, &current_link_number, &next_link)) {
write_start_of_link(next_link, out);
}
if (is_end_of_link(document, x, y, &current_link_number, &next_link)) {
write_end_of_link(out);
}
}
#ifdef DUMP_CHARSET_UTF8
unicode_val_T c;
Expand Down Expand Up @@ -180,6 +177,11 @@ DUMP_FUNCTION_SPECIALIZED(struct document *document, struct dump_output *out)
if (write_char(c, out))
return -1;
#endif /* !DUMP_CHARSET_UTF8 */
if (dumplinks) {
if (is_end_of_link(document, x, y, &current_link_number, &next_link)) {
write_end_of_link(out);
}
}
}

#ifndef DUMP_COLOR_MODE_NONE
Expand Down

0 comments on commit 023991e

Please sign in to comment.