Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

on resize - chgat() returns ERR when query is an empty string #9

Closed
mtshrmn opened this issue Jan 2, 2023 · 0 comments
Closed

on resize - chgat() returns ERR when query is an empty string #9

mtshrmn opened this issue Jan 2, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@mtshrmn
Copy link
Owner

mtshrmn commented Jan 2, 2023

How to recreate:

  1. search for nothing (press on / and then return)
  2. resize

for some reason this doesn't crash on specific chapters (or vise versa, crashes on specific pages).

Traceback:

Traceback (most recent call last):
  File "/home/suerflowz/.local/bin/nuber", line 8, in <module>
    sys.exit(main())
  File "/home/suerflowz/.local/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/suerflowz/.local/lib/python3.10/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/suerflowz/.local/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/suerflowz/.local/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/suerflowz/.local/lib/python3.10/site-packages/nuber/__init__.py", line 18, in main
    reader.loop() # type: ignore
  File "/home/suerflowz/.local/lib/python3.10/site-packages/ueberzug/lib/v0/__init__.py", line 378, in decorator
    return function(*args, canvas=self, **kwargs)
  File "/home/suerflowz/.local/lib/python3.10/site-packages/nuber/reader.py", line 434, in loop
    self.on_key(ch, canvas)
  File "/home/suerflowz/.local/lib/python3.10/site-packages/nuber/reader.py", line 388, in on_key
    action(canvas)
  File "/home/suerflowz/.local/lib/python3.10/site-packages/nuber/reader.py", line 362, in action_resize
    self.highlight_query()
  File "/home/suerflowz/.local/lib/python3.10/site-packages/nuber/reader.py", line 164, in highlight_query
    self.pad.chgat(row + row_offset, start_col, chars_len, f)
_curses.error: chgat() returned ERR
@mtshrmn mtshrmn added the bug Something isn't working label Jan 2, 2023
mtshrmn added a commit that referenced this issue Jan 4, 2023
return empty vector when given an empty query.
@mtshrmn mtshrmn closed this as completed Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant