|
Karsten Hopp |
efc1cb |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
efc1cb |
Subject: Patch 7.3.594
|
|
Karsten Hopp |
efc1cb |
Fcc: outbox
|
|
Karsten Hopp |
efc1cb |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
efc1cb |
Mime-Version: 1.0
|
|
Karsten Hopp |
efc1cb |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
efc1cb |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
efc1cb |
------------
|
|
Karsten Hopp |
efc1cb |
|
|
Karsten Hopp |
efc1cb |
Patch 7.3.594
|
|
Karsten Hopp |
efc1cb |
Problem: The X command server doesn't work perfectly. It sends an empty
|
|
Karsten Hopp |
efc1cb |
reply for as-keys requests.
|
|
Karsten Hopp |
efc1cb |
Solution: Remove duplicate ga_init2(). Do not send a reply for as-keys
|
|
Karsten Hopp |
efc1cb |
requests. (Brian Burns)
|
|
Karsten Hopp |
efc1cb |
Files: src/if_xcmdsrv.c
|
|
Karsten Hopp |
efc1cb |
|
|
Karsten Hopp |
efc1cb |
|
|
Karsten Hopp |
efc1cb |
*** ../vim-7.3.593/src/if_xcmdsrv.c 2010-08-15 21:57:27.000000000 +0200
|
|
Karsten Hopp |
efc1cb |
--- src/if_xcmdsrv.c 2012-07-10 14:15:59.000000000 +0200
|
|
Karsten Hopp |
efc1cb |
***************
|
|
Karsten Hopp |
efc1cb |
*** 655,661 ****
|
|
Karsten Hopp |
efc1cb |
if (SendInit(dpy) < 0)
|
|
Karsten Hopp |
efc1cb |
return NULL;
|
|
Karsten Hopp |
efc1cb |
}
|
|
Karsten Hopp |
efc1cb |
- ga_init2(&ga, 1, 100);
|
|
Karsten Hopp |
efc1cb |
|
|
Karsten Hopp |
efc1cb |
/*
|
|
Karsten Hopp |
efc1cb |
* Read the registry property.
|
|
Karsten Hopp |
efc1cb |
--- 655,660 ----
|
|
Karsten Hopp |
efc1cb |
***************
|
|
Karsten Hopp |
efc1cb |
*** 1198,1206 ****
|
|
Karsten Hopp |
efc1cb |
if ((*p == 'c' || *p == 'k') && (p[1] == 0))
|
|
Karsten Hopp |
efc1cb |
{
|
|
Karsten Hopp |
efc1cb |
Window resWindow;
|
|
Karsten Hopp |
efc1cb |
! char_u *name, *script, *serial, *end, *res;
|
|
Karsten Hopp |
efc1cb |
Bool asKeys = *p == 'k';
|
|
Karsten Hopp |
efc1cb |
- garray_T reply;
|
|
Karsten Hopp |
efc1cb |
char_u *enc;
|
|
Karsten Hopp |
efc1cb |
|
|
Karsten Hopp |
efc1cb |
/*
|
|
Karsten Hopp |
efc1cb |
--- 1197,1204 ----
|
|
Karsten Hopp |
efc1cb |
if ((*p == 'c' || *p == 'k') && (p[1] == 0))
|
|
Karsten Hopp |
efc1cb |
{
|
|
Karsten Hopp |
efc1cb |
Window resWindow;
|
|
Karsten Hopp |
efc1cb |
! char_u *name, *script, *serial, *end;
|
|
Karsten Hopp |
efc1cb |
Bool asKeys = *p == 'k';
|
|
Karsten Hopp |
efc1cb |
char_u *enc;
|
|
Karsten Hopp |
efc1cb |
|
|
Karsten Hopp |
efc1cb |
/*
|
|
Karsten Hopp |
efc1cb |
***************
|
|
Karsten Hopp |
efc1cb |
*** 1256,1305 ****
|
|
Karsten Hopp |
efc1cb |
if (script == NULL || name == NULL)
|
|
Karsten Hopp |
efc1cb |
continue;
|
|
Karsten Hopp |
efc1cb |
|
|
Karsten Hopp |
efc1cb |
! /*
|
|
Karsten Hopp |
efc1cb |
! * Initialize the result property, so that we're ready at any
|
|
Karsten Hopp |
efc1cb |
! * time if we need to return an error.
|
|
Karsten Hopp |
efc1cb |
! */
|
|
Karsten Hopp |
efc1cb |
! if (resWindow != None)
|
|
Karsten Hopp |
efc1cb |
! {
|
|
Karsten Hopp |
efc1cb |
! ga_init2(&reply, 1, 100);
|
|
Karsten Hopp |
efc1cb |
#ifdef FEAT_MBYTE
|
|
Karsten Hopp |
efc1cb |
! ga_grow(&reply, 50 + STRLEN(p_enc));
|
|
Karsten Hopp |
efc1cb |
! sprintf(reply.ga_data, "%cr%c-E %s%c-s %s%c-r ",
|
|
Karsten Hopp |
efc1cb |
0, 0, p_enc, 0, serial, 0);
|
|
Karsten Hopp |
efc1cb |
! reply.ga_len = 14 + STRLEN(p_enc) + STRLEN(serial);
|
|
Karsten Hopp |
efc1cb |
#else
|
|
Karsten Hopp |
efc1cb |
! ga_grow(&reply, 50);
|
|
Karsten Hopp |
efc1cb |
! sprintf(reply.ga_data, "%cr%c-s %s%c-r ", 0, 0, serial, 0);
|
|
Karsten Hopp |
efc1cb |
! reply.ga_len = 10 + STRLEN(serial);
|
|
Karsten Hopp |
efc1cb |
#endif
|
|
Karsten Hopp |
efc1cb |
! }
|
|
Karsten Hopp |
efc1cb |
! res = NULL;
|
|
Karsten Hopp |
efc1cb |
! if (serverName != NULL && STRICMP(name, serverName) == 0)
|
|
Karsten Hopp |
efc1cb |
! {
|
|
Karsten Hopp |
efc1cb |
! script = serverConvert(enc, script, &tofree);
|
|
Karsten Hopp |
efc1cb |
! if (asKeys)
|
|
Karsten Hopp |
efc1cb |
! server_to_input_buf(script);
|
|
Karsten Hopp |
efc1cb |
! else
|
|
Karsten Hopp |
efc1cb |
! res = eval_client_expr_to_string(script);
|
|
Karsten Hopp |
efc1cb |
! vim_free(tofree);
|
|
Karsten Hopp |
efc1cb |
! }
|
|
Karsten Hopp |
efc1cb |
! if (resWindow != None)
|
|
Karsten Hopp |
efc1cb |
! {
|
|
Karsten Hopp |
efc1cb |
! if (res != NULL)
|
|
Karsten Hopp |
efc1cb |
! ga_concat(&reply, res);
|
|
Karsten Hopp |
efc1cb |
! else if (asKeys == 0)
|
|
Karsten Hopp |
efc1cb |
! {
|
|
Karsten Hopp |
efc1cb |
! ga_concat(&reply, (char_u *)_(e_invexprmsg));
|
|
Karsten Hopp |
efc1cb |
! ga_append(&reply, 0);
|
|
Karsten Hopp |
efc1cb |
! ga_concat(&reply, (char_u *)"-c 1");
|
|
Karsten Hopp |
efc1cb |
! }
|
|
Karsten Hopp |
efc1cb |
! ga_append(&reply, NUL);
|
|
Karsten Hopp |
efc1cb |
! (void)AppendPropCarefully(dpy, resWindow, commProperty,
|
|
Karsten Hopp |
efc1cb |
! reply.ga_data, reply.ga_len);
|
|
Karsten Hopp |
efc1cb |
! ga_clear(&reply);
|
|
Karsten Hopp |
efc1cb |
! }
|
|
Karsten Hopp |
efc1cb |
! vim_free(res);
|
|
Karsten Hopp |
efc1cb |
}
|
|
Karsten Hopp |
efc1cb |
else if (*p == 'r' && p[1] == 0)
|
|
Karsten Hopp |
efc1cb |
{
|
|
Karsten Hopp |
efc1cb |
--- 1254,1305 ----
|
|
Karsten Hopp |
efc1cb |
if (script == NULL || name == NULL)
|
|
Karsten Hopp |
efc1cb |
continue;
|
|
Karsten Hopp |
efc1cb |
|
|
Karsten Hopp |
efc1cb |
! if (serverName != NULL && STRICMP(name, serverName) == 0)
|
|
Karsten Hopp |
efc1cb |
! {
|
|
Karsten Hopp |
efc1cb |
! script = serverConvert(enc, script, &tofree);
|
|
Karsten Hopp |
efc1cb |
! if (asKeys)
|
|
Karsten Hopp |
efc1cb |
! server_to_input_buf(script);
|
|
Karsten Hopp |
efc1cb |
! else
|
|
Karsten Hopp |
efc1cb |
! {
|
|
Karsten Hopp |
efc1cb |
! char_u *res;
|
|
Karsten Hopp |
efc1cb |
!
|
|
Karsten Hopp |
efc1cb |
! res = eval_client_expr_to_string(script);
|
|
Karsten Hopp |
efc1cb |
! if (resWindow != None)
|
|
Karsten Hopp |
efc1cb |
! {
|
|
Karsten Hopp |
efc1cb |
! garray_T reply;
|
|
Karsten Hopp |
efc1cb |
!
|
|
Karsten Hopp |
efc1cb |
! /* Initialize the result property. */
|
|
Karsten Hopp |
efc1cb |
! ga_init2(&reply, 1, 100);
|
|
Karsten Hopp |
efc1cb |
#ifdef FEAT_MBYTE
|
|
Karsten Hopp |
efc1cb |
! ga_grow(&reply, 50 + STRLEN(p_enc));
|
|
Karsten Hopp |
efc1cb |
! sprintf(reply.ga_data, "%cr%c-E %s%c-s %s%c-r ",
|
|
Karsten Hopp |
efc1cb |
0, 0, p_enc, 0, serial, 0);
|
|
Karsten Hopp |
efc1cb |
! reply.ga_len = 14 + STRLEN(p_enc) + STRLEN(serial);
|
|
Karsten Hopp |
efc1cb |
#else
|
|
Karsten Hopp |
efc1cb |
! ga_grow(&reply, 50);
|
|
Karsten Hopp |
efc1cb |
! sprintf(reply.ga_data, "%cr%c-s %s%c-r ",
|
|
Karsten Hopp |
efc1cb |
! 0, 0, serial, 0);
|
|
Karsten Hopp |
efc1cb |
! reply.ga_len = 10 + STRLEN(serial);
|
|
Karsten Hopp |
efc1cb |
#endif
|
|
Karsten Hopp |
efc1cb |
!
|
|
Karsten Hopp |
efc1cb |
! /* Evaluate the expression and return the result. */
|
|
Karsten Hopp |
efc1cb |
! if (res != NULL)
|
|
Karsten Hopp |
efc1cb |
! ga_concat(&reply, res);
|
|
Karsten Hopp |
efc1cb |
! else
|
|
Karsten Hopp |
efc1cb |
! {
|
|
Karsten Hopp |
efc1cb |
! ga_concat(&reply, (char_u *)_(e_invexprmsg));
|
|
Karsten Hopp |
efc1cb |
! ga_append(&reply, 0);
|
|
Karsten Hopp |
efc1cb |
! ga_concat(&reply, (char_u *)"-c 1");
|
|
Karsten Hopp |
efc1cb |
! }
|
|
Karsten Hopp |
efc1cb |
! ga_append(&reply, NUL);
|
|
Karsten Hopp |
efc1cb |
! (void)AppendPropCarefully(dpy, resWindow, commProperty,
|
|
Karsten Hopp |
efc1cb |
! reply.ga_data, reply.ga_len);
|
|
Karsten Hopp |
efc1cb |
! ga_clear(&reply);
|
|
Karsten Hopp |
efc1cb |
! }
|
|
Karsten Hopp |
efc1cb |
! vim_free(res);
|
|
Karsten Hopp |
efc1cb |
! }
|
|
Karsten Hopp |
efc1cb |
! vim_free(tofree);
|
|
Karsten Hopp |
efc1cb |
! }
|
|
Karsten Hopp |
efc1cb |
}
|
|
Karsten Hopp |
efc1cb |
else if (*p == 'r' && p[1] == 0)
|
|
Karsten Hopp |
efc1cb |
{
|
|
Karsten Hopp |
efc1cb |
*** ../vim-7.3.593/src/version.c 2012-07-10 13:41:09.000000000 +0200
|
|
Karsten Hopp |
efc1cb |
--- src/version.c 2012-07-10 14:17:50.000000000 +0200
|
|
Karsten Hopp |
efc1cb |
***************
|
|
Karsten Hopp |
efc1cb |
*** 716,717 ****
|
|
Karsten Hopp |
efc1cb |
--- 716,719 ----
|
|
Karsten Hopp |
efc1cb |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
efc1cb |
+ /**/
|
|
Karsten Hopp |
efc1cb |
+ 594,
|
|
Karsten Hopp |
efc1cb |
/**/
|
|
Karsten Hopp |
efc1cb |
|
|
Karsten Hopp |
efc1cb |
--
|
|
Karsten Hopp |
efc1cb |
A meeting is an event at which the minutes are kept and the hours are lost.
|
|
Karsten Hopp |
efc1cb |
|
|
Karsten Hopp |
efc1cb |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
efc1cb |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
efc1cb |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
efc1cb |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|