markqvist / NomadNet

Communicate Freely
GNU General Public License v3.0
1.23k stars 47 forks source link

Ctrl-e closing the program #22

Closed srem1 closed 1 year ago

srem1 commented 1 year ago

$ nomadnet --version Nomad Network Client 0.3.2

fedora 37

markqvist commented 1 year ago

Hmm, that is interesting. Just tried in 5 different terminal emulators. Cannot replicate here. What terminal emulator are you using?

Erethon commented 1 year ago

I can confirm this is happening on urxvt, but only when there are no conversations/addresses to select from. The exit code for nomadnet then is 1.

markqvist commented 1 year ago

Hmm, interesting. Thanks for confirming in. It should be catchable then. Can't reproduce on urxvt here though, strange. I'll try to see if I can catch that keycode somewhere before it gets interpreted by the terminal itself.

markqvist commented 1 year ago

Ok, it's in 2d6cd8e33fc9f25a997424cfdf1427bad4d577a4 if anyone wants to try it out :) Hopefully that works.

Erethon commented 1 year ago

Ok, it's in 2d6cd8e if anyone wants to try it out :) Hopefully that works.

This didn't fix it for me :/

This is my attempt at fixing it, but I'm missing something obvious as it now crashes when it shouldn't (but it doesn't crash anymore when the list is empty).

Same problem happens when trying to delete a conversation and there are none.

Erethon commented 1 year ago

This is my attempt at fixing it, but I'm missing something obvious as it now crashes when it shouldn't (but it doesn't crash anymore when the list is empty).

This was me not applying the patch correctly /facepalm, It works fine on my end. If it looks good to you @markqvist I'm happy to open a PR for this (or feel free to merge it as is).

markqvist commented 1 year ago

Ah, I completely misdiagnosed it! It is indeed a bug that occurs only when the lists are empty ;) I somehow missed that completely.

The fix looks good. If you open the PR I'll get it merged!

srem1 commented 1 year ago

fedora 37 xfce4-terminal 1.0.4 $ nomadnet --version Nomad Network Client 0.3.3

still this same trouble

(yes I have empty window and no contact, I don know how check my name in network)

Erethon commented 1 year ago

@srem1 There hasn't been a release of NomadNet with the fix included yet. You can download this repo (git clone or download the zip file) and run pip install . to see if this fixes it for you.

srem1 commented 1 year ago

@Erethon That's me waiting for a fix ;)