michael-lazar / rtv

Browse Reddit from your terminal
MIT License
4.64k stars 274 forks source link

Error when setting the terminal title #640

Closed woorst closed 5 years ago

woorst commented 5 years ago

rtv crashes when trying to set the terminal title after performing a search with a long query while within a multireddit.

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 "/home/user/builds/rtv/rtv/__main__.py", line 252, in <module>
    sys.exit(main())
  File "/home/user/builds/rtv/rtv/__main__.py", line 234, in main
    page.loop()
  File "/home/user/builds/rtv/rtv/page.py", line 82, in loop
    self.draw()
  File "/home/user/builds/rtv/rtv/page.py", line 371, in draw
    self._draw_header()
  File "/home/user/builds/rtv/rtv/page.py", line 422, in _draw_header
    title = title.rsplit('/', 1)[1]
IndexError: list index out of range
michael-lazar commented 5 years ago

Thanks for reporting, what version of rtv are you using?

woorst commented 5 years ago

The latest. Right off the git repo.