1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[document] discard_comb_x_y in reset_document

This commit is contained in:
Witold Filipczyk 2021-09-11 19:36:03 +02:00
parent 47e199ade9
commit 8f2ff7cd82
3 changed files with 13 additions and 3 deletions

View File

@ -299,6 +299,10 @@ reset_document(struct document *document)
mem_free_set(&document->slines1, NULL);
mem_free_set(&document->slines2, NULL);
mem_free_set(&document->search_points, NULL);
#ifdef CONFIG_COMBINE
discard_comb_x_y(document);
#endif
}
void

View File

@ -393,15 +393,13 @@ assert_comb_x_y_ok(const struct document *document)
#ifdef CONFIG_COMBINE
/** Discard any combining characters that have not yet been combined
* with to the previous base character. */
static void
void
discard_comb_x_y(struct document *document)
{
document->comb_x = -1;
document->comb_y = -1;
document->combi_length = 0;
}
#else
# define discard_comb_x_y(document) ((void) 0)
#endif
#ifdef CONFIG_COMBINE

View File

@ -121,6 +121,14 @@ void line_break(struct html_context *html_context);
void *html_special(struct html_context *html_context, enum html_special_type c, ...);
#ifdef CONFIG_COMBINE
/** Discard any combining characters that have not yet been combined
* with to the previous base character. */
void discard_comb_x_y(struct document *document);
#else
# define discard_comb_x_y(document) ((void) 0)
#endif
#ifdef __cplusplus
}