mirror of
git://git.code.sf.net/p/zsh/code
synced 2026-01-04 09:01:06 +01:00
use unmetafy() to allow writing special characters into a pty (13156)
This commit is contained in:
parent
8bcdb3b0e1
commit
bbb0d75e25
2 changed files with 11 additions and 4 deletions
|
|
@ -562,13 +562,15 @@ static int
|
|||
ptywrite(Ptycmd cmd, char **args, int nonl)
|
||||
{
|
||||
if (*args) {
|
||||
char sp = ' ';
|
||||
char sp = ' ', *tmp;
|
||||
int len;
|
||||
|
||||
while (*args)
|
||||
if (ptywritestr(cmd, *args, strlen(*args)) ||
|
||||
while (*args) {
|
||||
unmetafy((tmp = dupstring(*args)), &len);
|
||||
if (ptywritestr(cmd, tmp, len) ||
|
||||
(*++args && ptywritestr(cmd, &sp, 1)))
|
||||
return 1;
|
||||
|
||||
}
|
||||
if (!nonl) {
|
||||
sp = '\n';
|
||||
if (ptywritestr(cmd, &sp, 1))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue