kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
24.15k stars 972 forks source link

kitty icat stopped workin #2081

Closed rien333 closed 4 years ago

rien333 commented 4 years ago

https://github.com/kovidgoyal/kitty/commit/10e5fcc37535fdf6eed7f03f1c5380a2b4f0db9c broke kitty +kitten icat for me:

> kitty +kitten icat foo.jpg
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/bin/../lib/kitty/__main__.py", line 117, in <module>
    main()
  File "/usr/bin/../lib/kitty/__main__.py", line 113, in main
    func(sys.argv[1:])
  File "/usr/bin/../lib/kitty/__main__.py", line 12, in icat
    run_kitten('icat')
  File "/usr/bin/../lib/kitty/kittens/runner.py", line 103, in run_kitten
    runpy.run_module('kittens.{}.main'.format(kitten), run_name=run_name)
  File "/usr/lib/python3.7/runpy.py", line 208, in run_module
    return _run_code(code, {}, init_globals, run_name, mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/bin/../lib/kitty/kittens/icat/main.py", line 400, in <module>
    main()
  File "/usr/bin/../lib/kitty/kittens/icat/main.py", line 348, in main
    if screen_size().width == 0:
TypeError: 'Size' object is not callable

Apparently, aforementioned commit made changes to the value of screen_size(), but I'm not sure why the error occurs. (tagging @bew, as they probably know what's up if they have time to look into it)

System info

Arch Linux, with kitty build from HEAD. Same error occurs in other terminals.

Luflosi commented 4 years ago

Please test my PR linked above.

rien333 commented 4 years ago

Works great, thank you!