0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 7.4.1395

Problem:    Using DETACH in quotes is not compatible with the Netbeans
            interface. (Xavier de Gaye)
Solution:   Remove the quotes, only use them for JSON and JS mode.
This commit is contained in:
Bram Moolenaar 2016-02-22 23:13:33 +01:00
parent 0b962473dd
commit eed284a169
3 changed files with 10 additions and 4 deletions

View File

@ -1554,7 +1554,8 @@ channel_free_all(void)
/* Sent when the channel is found closed when reading. */ /* Sent when the channel is found closed when reading. */
#define DETACH_MSG "\"DETACH\"\n" #define DETACH_MSG_RAW "DETACH\n"
#define DETACH_MSG_JSON "\"DETACH\"\n"
/* Buffer size for reading incoming messages. */ /* Buffer size for reading incoming messages. */
#define MAXMSGSIZE 4096 #define MAXMSGSIZE 4096
@ -1658,6 +1659,7 @@ channel_read(channel_T *channel, int part, char *func)
int readlen = 0; int readlen = 0;
sock_T fd; sock_T fd;
int use_socket = FALSE; int use_socket = FALSE;
char *msg;
fd = channel->ch_part[part].ch_fd; fd = channel->ch_part[part].ch_fd;
if (fd == INVALID_FD) if (fd == INVALID_FD)
@ -1721,8 +1723,10 @@ channel_read(channel_T *channel, int part, char *func)
* -> channel_read() * -> channel_read()
*/ */
ch_errors(channel, "%s(): Cannot read", func); ch_errors(channel, "%s(): Cannot read", func);
channel_save(channel, part, msg = channel->ch_part[part].ch_mode == MODE_RAW
(char_u *)DETACH_MSG, (int)STRLEN(DETACH_MSG)); || channel->ch_part[part].ch_mode == MODE_NL
? DETACH_MSG_RAW : DETACH_MSG_JSON;
channel_save(channel, part, (char_u *)msg, (int)STRLEN(msg));
/* TODO: When reading from stdout is not possible, should we try to /* TODO: When reading from stdout is not possible, should we try to
* keep stdin and stderr open? Probably not, assume the other side * keep stdin and stderr open? Probably not, assume the other side

View File

@ -461,7 +461,7 @@ nb_parse_cmd(char_u *cmd)
/* NOTREACHED */ /* NOTREACHED */
} }
if (STRCMP(cmd, "\"DETACH\"") == 0) if (STRCMP(cmd, "DETACH") == 0)
{ {
buf_T *buf; buf_T *buf;

View File

@ -748,6 +748,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1395,
/**/ /**/
1394, 1394,
/**/ /**/