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