[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
send-string-to-terminal truncates the string to length 17384
From: |
Amos Bird |
Subject: |
send-string-to-terminal truncates the string to length 17384 |
Date: |
Tue, 21 Aug 2018 01:39:54 +0800 |
User-agent: |
mu4e 1.1.0; emacs 27.0.50 |
Hi,
I use send-string-to-terminal as a osc52 clipboard content
generator. However it seems to have a implicit uplimit on the
string size, which I don't find by looking at the source code.
```
DEFUN ("send-string-to-terminal", Fsend_string_to_terminal,
Ssend_string_to_terminal, 1, 2, 0,
doc: /* Send STRING to the terminal without alteration.
Control characters in STRING will have terminal-dependent effects.
Optional parameter TERMINAL specifies the tty terminal device to
use.
It may be a terminal object, a frame, or nil for the terminal used
by
the currently selected frame. In batch mode, STRING is sent to
stdout
when TERMINAL is nil. */)
(Lisp_Object string, Lisp_Object terminal)
{
struct terminal *t = decode_live_terminal (terminal);
FILE *out;
/* ??? Perhaps we should do something special for multibyte
strings here. */
CHECK_STRING (string);
block_input ();
if (t->type == output_initial)
out = stdout;
else if (t->type != output_termcap && t->type !=
output_msdos_raw)
error ("Device %d is not a termcap terminal device", t->id);
else
{
struct tty_display_info *tty = t->display_info.tty;
if (! tty->output)
error ("Terminal is currently suspended");
if (tty->termscript)
{
fwrite_unlocked (SDATA (string), 1, SBYTES (string),
tty->termscript);
fflush_unlocked (tty->termscript);
}
out = tty->output;
}
fwrite_unlocked (SDATA (string), 1, SBYTES (string), out);
fflush_unlocked (out);
unblock_input ();
return Qnil;
}
```
I'm using libvte to test the issue. Sending the string directly
from terminal or inside tmux works fine. It gets truncated when
sending via emacs's send-string-to-terminal.
Any ideas? Thanks!
regards,
--
Amos Bird
amosbird@gmail.com
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- send-string-to-terminal truncates the string to length 17384,
Amos Bird <=