d99kris / nchat

Terminal-based Telegram / WhatsApp client for Linux and macOS
MIT License
524 stars 40 forks source link

Setting home to Ctrl-Home might stop working after some shortcuts get pressed #193

Closed fulalas closed 3 months ago

fulalas commented 4 months ago

After adding an emoji (Ctrl-S) or opening the contact list search (Ctrl-N), my Ctrl-Home (home=\33\133\61\73\65\110) bind to home (beginning of history) stops working, and it doesn't work anymore until I quit nchat and open it again. The character that appears when I hit Ctrl-Home (after the issue starts) is: 􏌓

The same applies to end (end of history) associated to Ctrl-End (end=\33\133\61\73\65\106), and the character that appears instead is: 􏌒

It applies to both Telegram and WhatsApp contacts.

No other shortcut has this issue.

d99kris commented 4 months ago

Hi @fulalas - thanks for reporting. Could you please share a copy of your ~/.nchat/key.conf? Either copy and paste the content in a comment here, or attach it as-is (might require making a copy of the file with a .txt suffix for Github to accept it).

fulalas commented 4 months ago

Sure!

key.conf.txt

d99kris commented 3 months ago

Thanks @fulalas - I can reproduce the bug here too. I'm preparing a fix, hope to get it tested and push it this weekend.

d99kris commented 3 months ago

Hi @fulalas - the above commit should fix the reported issue. Please let me know if you still encounter problems.

fulalas commented 3 months ago

Yes, it works. Thanks a lot!

I have 2 questions though:

  1. is there a way to make -DCMAKE_INSTALL_LIBDIR=lib64 work? On some distros we don't want 64-bit libs to go into /usr/lib, but /usr/lib64 instead. I tried to use it on your project, but it seems it doesn't have any effect.
  2. the nchat version I was using before was built on Arch, and magically libwmchat.so didn't depend on libgo, but now that I'm building on PorteuX (Slackware current based), it's depending on libgo, which is a big showstopper for me. Do you know how to workaround that?
fulalas commented 3 months ago

OK, for the question 2 I found the answer: we need to compile using golang instead of gcc-go.

d99kris commented 3 months ago

Hi @fulalas - for question 1 - I will look into preparing a fix for this, I can see that it's currently hardcoded to lib.

d99kris commented 3 months ago

Hi again - in 59afacd support for custom CMAKE_INSTALL_LIBDIR has been added. Please try it out and let me know if you encounter any issues (ideally by reporting a new bug). Thanks!

fulalas commented 3 months ago

It's working perfectly! Thanks a lot!