home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.3 / 7.3.594 < prev    next >
Encoding:
Internet Message Format  |  2012-11-20  |  4.8 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.3.594
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.3.594
  11. Problem:    The X command server doesn't work perfectly. It sends an empty
  12.         reply for as-keys requests.
  13. Solution:   Remove duplicate ga_init2(). Do not send a reply for as-keys
  14.         requests. (Brian Burns)
  15. Files:        src/if_xcmdsrv.c
  16.  
  17.  
  18. *** ../vim-7.3.593/src/if_xcmdsrv.c    2010-08-15 21:57:27.000000000 +0200
  19. --- src/if_xcmdsrv.c    2012-07-10 14:15:59.000000000 +0200
  20. ***************
  21. *** 655,661 ****
  22.       if (SendInit(dpy) < 0)
  23.           return NULL;
  24.       }
  25. -     ga_init2(&ga, 1, 100);
  26.   
  27.       /*
  28.        * Read the registry property.
  29. --- 655,660 ----
  30. ***************
  31. *** 1198,1206 ****
  32.       if ((*p == 'c' || *p == 'k') && (p[1] == 0))
  33.       {
  34.           Window    resWindow;
  35. !         char_u    *name, *script, *serial, *end, *res;
  36.           Bool    asKeys = *p == 'k';
  37. -         garray_T    reply;
  38.           char_u    *enc;
  39.   
  40.           /*
  41. --- 1197,1204 ----
  42.       if ((*p == 'c' || *p == 'k') && (p[1] == 0))
  43.       {
  44.           Window    resWindow;
  45. !         char_u    *name, *script, *serial, *end;
  46.           Bool    asKeys = *p == 'k';
  47.           char_u    *enc;
  48.   
  49.           /*
  50. ***************
  51. *** 1256,1305 ****
  52.           if (script == NULL || name == NULL)
  53.           continue;
  54.   
  55. !         /*
  56. !          * Initialize the result property, so that we're ready at any
  57. !          * time if we need to return an error.
  58. !          */
  59. !         if (resWindow != None)
  60. !         {
  61. !         ga_init2(&reply, 1, 100);
  62.   #ifdef FEAT_MBYTE
  63. !         ga_grow(&reply, 50 + STRLEN(p_enc));
  64. !         sprintf(reply.ga_data, "%cr%c-E %s%c-s %s%c-r ",
  65.                              0, 0, p_enc, 0, serial, 0);
  66. !         reply.ga_len = 14 + STRLEN(p_enc) + STRLEN(serial);
  67.   #else
  68. !         ga_grow(&reply, 50);
  69. !         sprintf(reply.ga_data, "%cr%c-s %s%c-r ", 0, 0, serial, 0);
  70. !         reply.ga_len = 10 + STRLEN(serial);
  71.   #endif
  72. !         }
  73. !         res = NULL;
  74. !         if (serverName != NULL && STRICMP(name, serverName) == 0)
  75. !         {
  76. !         script = serverConvert(enc, script, &tofree);
  77. !         if (asKeys)
  78. !             server_to_input_buf(script);
  79. !         else
  80. !             res = eval_client_expr_to_string(script);
  81. !         vim_free(tofree);
  82. !         }
  83. !         if (resWindow != None)
  84. !         {
  85. !         if (res != NULL)
  86. !             ga_concat(&reply, res);
  87. !         else if (asKeys == 0)
  88. !         {
  89. !             ga_concat(&reply, (char_u *)_(e_invexprmsg));
  90. !             ga_append(&reply, 0);
  91. !             ga_concat(&reply, (char_u *)"-c 1");
  92. !         }
  93. !         ga_append(&reply, NUL);
  94. !         (void)AppendPropCarefully(dpy, resWindow, commProperty,
  95. !                        reply.ga_data, reply.ga_len);
  96. !         ga_clear(&reply);
  97. !         }
  98. !         vim_free(res);
  99.       }
  100.       else if (*p == 'r' && p[1] == 0)
  101.       {
  102. --- 1254,1305 ----
  103.           if (script == NULL || name == NULL)
  104.           continue;
  105.   
  106. !             if (serverName != NULL && STRICMP(name, serverName) == 0)
  107. !             {
  108. !                 script = serverConvert(enc, script, &tofree);
  109. !                 if (asKeys)
  110. !                     server_to_input_buf(script);
  111. !                 else
  112. !                 {
  113. !                     char_u      *res;
  114. !                     res = eval_client_expr_to_string(script);
  115. !             if (resWindow != None)
  116. !             {
  117. !             garray_T    reply;
  118. !             /* Initialize the result property. */
  119. !             ga_init2(&reply, 1, 100);
  120.   #ifdef FEAT_MBYTE
  121. !             ga_grow(&reply, 50 + STRLEN(p_enc));
  122. !             sprintf(reply.ga_data, "%cr%c-E %s%c-s %s%c-r ",
  123.                              0, 0, p_enc, 0, serial, 0);
  124. !             reply.ga_len = 14 + STRLEN(p_enc) + STRLEN(serial);
  125.   #else
  126. !             ga_grow(&reply, 50);
  127. !             sprintf(reply.ga_data, "%cr%c-s %s%c-r ",
  128. !                                  0, 0, serial, 0);
  129. !             reply.ga_len = 10 + STRLEN(serial);
  130.   #endif
  131. !             /* Evaluate the expression and return the result. */
  132. !             if (res != NULL)
  133. !                 ga_concat(&reply, res);
  134. !             else
  135. !             {
  136. !                 ga_concat(&reply, (char_u *)_(e_invexprmsg));
  137. !                 ga_append(&reply, 0);
  138. !                 ga_concat(&reply, (char_u *)"-c 1");
  139. !             }
  140. !             ga_append(&reply, NUL);
  141. !             (void)AppendPropCarefully(dpy, resWindow, commProperty,
  142. !                          reply.ga_data, reply.ga_len);
  143. !             ga_clear(&reply);
  144. !             }
  145. !                     vim_free(res);
  146. !                 }
  147. !                 vim_free(tofree);
  148. !             }
  149.       }
  150.       else if (*p == 'r' && p[1] == 0)
  151.       {
  152. *** ../vim-7.3.593/src/version.c    2012-07-10 13:41:09.000000000 +0200
  153. --- src/version.c    2012-07-10 14:17:50.000000000 +0200
  154. ***************
  155. *** 716,717 ****
  156. --- 716,719 ----
  157.   {   /* Add new patch number below this line */
  158. + /**/
  159. +     594,
  160.   /**/
  161.  
  162. -- 
  163. A meeting is an event at which the minutes are kept and the hours are lost.
  164.  
  165.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  166. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  167. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  168.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  169.