mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
[pre] Wrap text in pre (SHIFT-w by default). Refs #69
This commit is contained in:
parent
b7b0b28ea8
commit
c8acb75bcd
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user