darrikonn / td-cli

A todo command line todo manager ✔️
https://pypi.org/project/td-cli/
MIT License
193 stars 10 forks source link

Interactive td-cli quits after resume pushing any arrow button #25

Closed p3k closed 3 years ago

p3k commented 3 years ago

If I do this:

  1. Run td -i
  2. Suspend with ^Z
  3. Resume with fg
  4. Press arrow down button ↓ to select next entry

– then td-cli simply quits and I need to restart it.

Not sure if this is an effect of my setup, would be glad if someone could verify / try to reproduce.

darrikonn commented 3 years ago

Yuup, happens to me as well. I only use the vim keybindings (hjkl), so I haven't seen this before :). Doesn't happen with hjkl.

Will fix it! Thanks for the issue.

p3k commented 3 years ago

well, thank you for td-cli and your swift reply.

darrikonn commented 3 years ago

Spent some time debugging this and I believe this is an issue with Python Curses. After resuming a suspended task, the arrow keys indeed return the escape character from Python Curses which td-cli correctly interprets as exiting the interactive mode.

I currently don't have time to take this further. The next steps would be to file an issue with Python Curses regarding the stdscr.getch() + arrow keys + resuming fg = escape (27).

p3k commented 3 years ago

i see, seems to be a rabbit hole… if i find the time i am going to take a look at the python curses repo and maybe file an issue.

in the meantime i am training my muscle memory with the vim keybindings :muscle:

darrikonn commented 3 years ago

i see, seems to be a rabbit hole… if i find the time i am going to take a look at the python curses repo and maybe file an issue.

in the meantime i am training my muscle memory with the vim keybindings 💪

Awesome, thanks! Lol, yeah the vim keybindings take time to adjust :).

darrikonn commented 3 years ago

I've submitted an issue for this: https://bugs.python.org/issue43854

p3k commented 3 years ago

great! i took a coarse look yesterday but was not sure whether i am capable of providing the necessary information. glad you did now :) cheers.

darrikonn commented 3 years ago

Closing this one since td-cli can't fix it (needs to be resolved by curses)