parkouss / webmacs

webmacs - keyboard driven (emacs key bindings) browser, https://webmacs.readthedocs.io/en/latest/
GNU General Public License v3.0
156 stars 21 forks source link

Error on text-zoom-in #80

Open jbmestelan opened 6 years ago

jbmestelan commented 6 years ago

Hello.

Invoking the function text-zoom-in results in this error:

Traceback (most recent call last):
  File "~/git_repos/www/webmacs/webmacs/commands/webbuffer.py", line 409, in _wrapper
    % (ratio * 100))
TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'
./webmacs: line 14:  2811 Aborted                 python -m w

Indeed, it would seem that ratio is undefined in: webbuffer.py

def _show_info_text_zoom(ctx):
    def _wrapper(ratio):
parkouss commented 6 years ago

Thanks for reporting it. The text zoom is not working really well anyway currently, and requires some tests and fixes. (Note in case you are interested, I if you know a bit of javascript and python and want to help on this, you are more than welcome to contribute :)).

parkouss commented 6 years ago

For some more details, the ratio variable comes from the javascript world, by calling textzoom.changeFont (in webmacs/scripts/textzoom.js). The function should always returns a non-null variable, so I suspect there is an exception raised in there. Running with -w info might give some more details.