Merge remote-tracking branch 'vim/master'

This commit is contained in:
Kazuki Sakamoto
2016-01-27 20:41:24 -08:00
7 changed files with 36 additions and 21 deletions
+18 -1
View File
@@ -226,7 +226,6 @@ channel_gui_register(int idx)
/*
* Tell Windows we are interested in receiving message when there
* is input on the editor connection socket.
* TODO: change WM_NETBEANS to something related to the channel index.
*/
if (channel->ch_inputHandler == -1)
channel->ch_inputHandler =
@@ -697,6 +696,24 @@ channel_read(int idx)
#endif
}
# if defined(FEAT_GUI_W32) || defined(PROTO)
/*
* Lookup the channel index from the socket.
* Returns -1 when the socket isn't found.
*/
int
channel_socket2idx(sock_T fd)
{
int i;
if (fd >= 0)
for (i = 0; i < channel_count; ++i)
if (channels[i].ch_fd == fd)
return i;
return -1;
}
# endif
/*
* Write "buf" (NUL terminated string) to channel "idx".
* When "fun" is not NULL an error message might be given.
+4 -2
View File
@@ -1782,8 +1782,10 @@ process_message(void)
#ifdef FEAT_CHANNEL
if (msg.message == WM_NETBEANS)
{
/* TODO: channel_read(idx) */
netbeans_read();
int channel_idx = channel_socket2idx((sock_T)msg.wParam);
if (channel_idx >= 0)
channel_read(channel_idx);
return;
}
#endif
-8
View File
@@ -427,14 +427,6 @@ netbeans_parse_messages(void)
}
}
/* TODO: remove */
void
netbeans_read()
{
if (nb_channel_idx >= 0)
channel_read(nb_channel_idx);
}
/*
* Handle one NUL terminated command.
*
+9 -9
View File
@@ -2824,10 +2824,10 @@ mch_copy_sec(from_file, to_file)
ret = setxattr((char*)to_file, name, buffer, (size_t)size, 0);
if (ret < 0)
{
MSG_PUTS(_("Could not set security context "));
MSG_PUTS(name);
MSG_PUTS(_(" for "));
msg_outtrans(to_file);
vim_snprintf((char *)IObuff, IOSIZE,
_("Could not set security context %s for %s"),
name, to_file);
msg_outtrans(IObuff);
msg_putchar('\n');
}
}
@@ -2844,11 +2844,11 @@ mch_copy_sec(from_file, to_file)
case ERANGE:
default:
/* no enough size OR unexpected error */
MSG_PUTS(_("Could not get security context "));
MSG_PUTS(name);
MSG_PUTS(_(" for "));
msg_outtrans(from_file);
MSG_PUTS(_(". Removing it!\n"));
vim_snprintf((char *)IObuff, IOSIZE,
_("Could not get security context %s for %s. Removing it!"),
name, from_file);
msg_puts(IObuff);
msg_putchar('\n');
/* FALLTHROUGH to remove the attribute */
case ENODATA:
+1
View File
@@ -9,6 +9,7 @@ char_u *channel_get(int idx);
int channel_collapse(int idx);
void channel_clear(int idx);
void channel_read(int idx);
int channel_socket2idx(sock_T fd);
void channel_send(int idx, char_u *buf, char *fun);
int channel_poll_setup(int nfd_in, void *fds_in);
int channel_poll_check(int ret_in, void *fds_in);
-1
View File
@@ -1,6 +1,5 @@
/* netbeans.c */
void netbeans_parse_messages(void);
void netbeans_read(void);
int isNetbeansBuffer(buf_T *bufp);
int isNetbeansModified(buf_T *bufp);
void netbeans_end(void);
+4
View File
@@ -761,6 +761,10 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1187,
/**/
1186,
/**/
1185,
/**/