summaryrefslogtreecommitdiffstats
path: root/network/elinks/patches/0010-force-text-wrap.patch
diff options
context:
space:
mode:
Diffstat (limited to 'network/elinks/patches/0010-force-text-wrap.patch')
-rw-r--r--network/elinks/patches/0010-force-text-wrap.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/network/elinks/patches/0010-force-text-wrap.patch b/network/elinks/patches/0010-force-text-wrap.patch
new file mode 100644
index 0000000000..4705cb0893
--- /dev/null
+++ b/network/elinks/patches/0010-force-text-wrap.patch
@@ -0,0 +1,26 @@
+# This wraps <pre> text too when "W" is pressed.
+# (main toggle-wrap-text)
+diff --git a/src/document/html/renderer.c b/src/document/html/renderer.c
+index 6470c54..a40a4ef 100644
+--- a/src/document/html/renderer.c
++++ b/src/document/html/renderer.c
+@@ -1801,7 +1801,7 @@ put_chars(struct html_context *html_context, unsigned char *chars, int charslen)
+
+ 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)
+ && part->cx > par_format.leftmargin) {
+ int x = split_line(html_context);
+@@ -1822,9 +1822,7 @@ put_chars(struct html_context *html_context, unsigned char *chars, int charslen)
+ int_lower_bound(&part->max_width, part->xa
+ + par_format.leftmargin + par_format.rightmargin
+ - (chars[charslen - 1] == ' '
+- && !html_is_preformatted()));
+- return;
+-
++ && (html_context->options->wrap || !html_is_preformatted())));
+ }
+
+ #undef overlap