Open bagage opened 4 years ago
Since we already have some other dependencies like wcwidth I'm not against adding one for the clipboard. There's at least the libraries clipboard
and pyperclip
. Not sure which one we should use but pyperclip
seems to be more popular.
init_pair
on Windows if it doesn't work, as long as it doesn't cause other issues.Thanks again for the effort, I appreciate it! :)
backspace is the same as hitting ctrl+h, so instead of removing the latest character, it toggles the help. Hence the shortcut for help toggle should be something else, maybe only for windows (F3?F7?F8?). But since default keymapping is global, I'm not sure how this could be done.
Maybe it can be open as a separate issue as it does not block suplemon from working at least?
Sorry for the late answer. Yeah, I guess it can be a separate issue, as long as backspace works for deleting characters. Help is also available by running the command help
so it's not a huge issue. I do think we can have different default keymaps for different platforms as that's what Sublime seems to do.
I took a closer look at clipboard
and pyperclip
and I think we should use pyperclip
instead.
clipboard
just wraps pyperclp
and doesn't provide any additional functionality: https://github.com/terryyin/clipboard/blob/master/clipboard.py
Hi @richrd, sorry for the long answer! I finally managed to find some time to address the remaining issues.
clipboard
with pyperclip
^H
is now behaving as backspace
instead of toggling help, even on Linux. Ideally if shortcuts could be per platform that would be needed only on Windows.resizeterm
with resize_term
to make it work on Windows, while not breaking Linux (I tested quickly)Let me know if there is anything to rework/address :).
Bump @richrd :call_me_hand:
Hi and sorry for the late response! Summer has been busy :) I'll test this out next week. The code looks good so I think it's pretty much ready for merging. Thanks for your help :)
Fixes #261
clipboard
library is less powerful than usingxclip/pbsel
directly (binary data and such?). Thoughts on that @richrd?