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

send-text character limit #2607

Closed
jbrea opened this issue Apr 29, 2020 · 13 comments
Closed

send-text character limit #2607

jbrea opened this issue Apr 29, 2020 · 13 comments

Comments

@jbrea
Copy link

jbrea commented Apr 29, 2020

Hi

I used to send large junks of code from vim to kitty via vim-slime.
vim-slime writes to ~/.slime_paste, and invokes kitty @ send-text --match id:ID --from-file ~/.slime_paste where ID is some window id.
Ever since I upgraded kitty to version 0.17.3 I cannot send anymore junks of code of more than 1024 characters.

Is there a way around this limitation?

@kovidgoyal
Copy link
Owner

I'm going ot need a way to reproduce this without need vim slime or
similar. I tried the following simple test

Created a file of 2048 bytes first 1024 a and then 1024 b

Ran kitty with kitty -o allow_remote_control=y

Inside kitty ran

kitty @ send-text --from-file filename

All 2048 bytes were transmitted

@jbrea
Copy link
Author

jbrea commented Apr 29, 2020

Created a file of 2048 bytes first 1024 a and then 1024 b
Ran kitty with kitty -o allow_remote_control=y
Inside kitty ran
kitty @ send-text --from-file filename

I just tried the same. Nothing gets transmitted (unless I remove every b).
What kind of information can I provide to debug this?
I am on arch linux with kernel 5.6.7-arch1-1, i3 window manager 4.18.1 and python 3.8.2.

@kovidgoyal
Copy link
Owner

Run kitty from another terminal and see what error if any are printed
out. Have you enabled remote control?? Does sending simple text like

kitty @ send-text test

work?

@jbrea
Copy link
Author

jbrea commented Apr 29, 2020

kitty @ send-text test

Yes, this works.

kitty @ send-text --from-file filename also works, if filename contains less than 1025 characters.

No error gets printed when I run kitty from another terminal.

@kovidgoyal
Copy link
Owner

and if the file contains more than 1024 chars nothing happens, at all??

@jbrea
Copy link
Author

jbrea commented Apr 29, 2020

and if the file contains more than 1024 chars nothing happens, at all??

Exactly.

@kovidgoyal
Copy link
Owner

Sorry, I am out of ideas. You will need to look into running kitty from source and debugging.

@kovidgoyal
Copy link
Owner

The code for the send-text command is in send_text.py and the code that actually sends the data is in remote_control.py. Oh one thing, are you using --listen-on to run remote control with a socket?

@jbrea
Copy link
Author

jbrea commented Apr 29, 2020

I did not use --listen-on before, but I just tried.
Almost same behaviour: it works fine with files that have no more than 1024 characters, but doesn't show anything except the error write() to peer socket failed with error: Broken pipe otherwise.

@jbrea
Copy link
Author

jbrea commented Apr 29, 2020

I'm not used to debugging python code, but I will try...

@kovidgoyal
Copy link
Owner

I can replicate the issue with using --listen-on but not without

@jbrea
Copy link
Author

jbrea commented Apr 29, 2020

Ah, I had a KITTY_LISTEN_ON env variable set in the terminal where I ran kitty without the --listen-on argument. Without this env variable and without using a socket, everything works.

Thanks a lot for your help!!!

@Luflosi
Copy link
Contributor

Luflosi commented Apr 29, 2020

Did you see the fix above? Compile from source and try it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants