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 / 6.1.047 < prev    next >
Encoding:
Internet Message Format  |  2002-11-04  |  3.3 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.047
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.1.047
  11. Problem:    When skipping commands after an error was encountered, expressions
  12.         for ":if", ";elseif" and ":while" are still evaluated.
  13. Solution:   Skip the expression after an error. (Servatius Brandt)
  14. Files:        src/ex_docmd.c
  15.  
  16.  
  17. *** ../vim61.046/src/ex_docmd.c    Wed May  1 19:40:35 2002
  18. --- src/ex_docmd.c    Fri May  3 22:06:38 2002
  19. ***************
  20. *** 7197,7202 ****
  21. --- 7197,7205 ----
  22.   
  23.   #ifdef FEAT_EVAL
  24.   
  25. + /*
  26. +  * ":if".
  27. +  */
  28.       static void
  29.   ex_if(eap)
  30.       exarg_T    *eap;
  31. ***************
  32. *** 7214,7223 ****
  33.       cstack->cs_flags[cstack->cs_idx] = 0;
  34.   
  35.       /*
  36. !      * Don't do something when there is a surrounding conditional and it
  37. !      * was not active.
  38.        */
  39. !     skip = (cstack->cs_idx > 0
  40.           && !(cstack->cs_flags[cstack->cs_idx - 1] & CSF_ACTIVE));
  41.   
  42.       result = eval_to_bool(eap->arg, &error, &eap->nextcmd, skip);
  43. --- 7217,7226 ----
  44.       cstack->cs_flags[cstack->cs_idx] = 0;
  45.   
  46.       /*
  47. !      * Don't do something after an error or when there is a surrounding
  48. !      * conditional and it was not active.
  49.        */
  50. !     skip = did_emsg || (cstack->cs_idx > 0
  51.           && !(cstack->cs_flags[cstack->cs_idx - 1] & CSF_ACTIVE));
  52.   
  53.       result = eval_to_bool(eap->arg, &error, &eap->nextcmd, skip);
  54. ***************
  55. *** 7269,7278 ****
  56.       else
  57.       {
  58.       /*
  59. !      * Don't do something when there is a surrounding conditional and it
  60. !      * was not active.
  61.        */
  62. !     skip = (cstack->cs_idx > 0
  63.           && !(cstack->cs_flags[cstack->cs_idx - 1] & CSF_ACTIVE));
  64.       if (!skip)
  65.       {
  66. --- 7272,7281 ----
  67.       else
  68.       {
  69.       /*
  70. !      * Don't do something after an error or when there is a surrounding
  71. !      * conditional and it was not active.
  72.        */
  73. !     skip = did_emsg || (cstack->cs_idx > 0
  74.           && !(cstack->cs_flags[cstack->cs_idx - 1] & CSF_ACTIVE));
  75.       if (!skip)
  76.       {
  77. ***************
  78. *** 7332,7341 ****
  79.       cstack->cs_flags[cstack->cs_idx] = CSF_WHILE;
  80.   
  81.       /*
  82. !      * Don't do something when there is a surrounding conditional and it
  83. !      * was not active.
  84.        */
  85. !     skip = (cstack->cs_idx > 0
  86.           && !(cstack->cs_flags[cstack->cs_idx - 1] & CSF_ACTIVE));
  87.       result = eval_to_bool(eap->arg, &error, &eap->nextcmd, skip);
  88.   
  89. --- 7335,7344 ----
  90.       cstack->cs_flags[cstack->cs_idx] = CSF_WHILE;
  91.   
  92.       /*
  93. !      * Don't do something after an error or when there is a surrounding
  94. !      * conditional and it was not active.
  95.        */
  96. !     skip = did_emsg || (cstack->cs_idx > 0
  97.           && !(cstack->cs_flags[cstack->cs_idx - 1] & CSF_ACTIVE));
  98.       result = eval_to_bool(eap->arg, &error, &eap->nextcmd, skip);
  99.   
  100. *** ../vim61.046/src/version.c    Fri May  3 22:02:55 2002
  101. --- src/version.c    Fri May  3 22:08:52 2002
  102. ***************
  103. *** 608,609 ****
  104. --- 608,611 ----
  105.   {   /* Add new patch number below this line */
  106. + /**/
  107. +     47,
  108.   /**/
  109.  
  110. -- 
  111. Biting someone with your natural teeth is "simple assault," while biting
  112. someone with your false teeth is "aggravated assault."
  113.         [real standing law in Louisana, United States of America]
  114.  
  115.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  116. ///   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   \\\
  117. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  118.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  119.