1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-28 01:35:32 +00:00

[pre] Wrap text in pre (SHIFT-w by default). Refs #69

This commit is contained in:
Witold Filipczyk 2020-09-19 21:48:53 +02:00
parent b7b0b28ea8
commit c8acb75bcd

View File

@ -1907,7 +1907,7 @@ put_chars(struct html_context *html_context, unsigned char *chars, int charslen)
renderer_context.nobreak = 0; renderer_context.nobreak = 0;
if (!(html_context->options->wrap || html_is_preformatted())) { if (html_context->options->wrap || !html_is_preformatted()) {
while (part->cx > overlap(par_format) while (part->cx > overlap(par_format)
&& part->cx > par_format.leftmargin) { && part->cx > par_format.leftmargin) {
int x = split_line(html_context); int x = split_line(html_context);
@ -1928,9 +1928,7 @@ put_chars(struct html_context *html_context, unsigned char *chars, int charslen)
int_lower_bound(&part->max_width, part->xa int_lower_bound(&part->max_width, part->xa
+ par_format.leftmargin + par_format.rightmargin + par_format.leftmargin + par_format.rightmargin
- (chars[charslen - 1] == ' ' - (chars[charslen - 1] == ' '
&& !html_is_preformatted())); && (html_context->options->wrap || !html_is_preformatted())));
return;
} }
#undef overlap #undef overlap