5

visual-line-mode works fine for line wrapping in eww-mode. However, when I type C-x C-+ / C-x C-- to change the font size, the line wrapping does not adjust accordingly.

Does anyone know how can this be achieved?

angeldsWang
  • 111
  • 6
  • 1
    `eww` won't reflow the document unless you reload it. If you want your font size changing commands to reflow the document, you'd need to advise them with a function that runs `eww-reload` afterwards (which has an optional argument to use a local copy rather than fetching the document again). –  Nov 13 '18 at 18:55

1 Answers1

2

Thanks to @DoMiNeLa10's advice. I tried to add a local hook for text-scale-mode, it does work.

(defun my/text-scale-mode-hook ()
  (eww-reload :local))

(add-hook 'eww-mode-hook
          (lambda()
            (add-hook 'text-scale-mode-hook
                      'my/text-scale-mode-hook
                      nil :local)))
angeldsWang
  • 111
  • 6