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.879 < prev    next >
Encoding:
Internet Message Format  |  2013-04-04  |  2.7 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.3.879
  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.879
  11. Problem:    When using an ex command in operator pending mode, using Esc to
  12.         abort the command still executes the operator. (David B├╝rgin)
  13. Solution:   Clear the operator when the ex command fails. (Christian Brabandt)
  14. Files:        src/normal.c
  15.  
  16.  
  17. *** ../vim-7.3.878/src/normal.c    2013-03-16 14:20:45.000000000 +0100
  18. --- src/normal.c    2013-04-05 16:54:13.000000000 +0200
  19. ***************
  20. *** 5418,5423 ****
  21. --- 5418,5424 ----
  22.       cmdarg_T  *cap;
  23.   {
  24.       int        old_p_im;
  25. +     int        cmd_result;
  26.   
  27.   #ifdef FEAT_VISUAL
  28.       if (VIsual_active)
  29. ***************
  30. *** 5449,5455 ****
  31.       old_p_im = p_im;
  32.   
  33.       /* get a command line and execute it */
  34. !     do_cmdline(NULL, getexline, NULL,
  35.                   cap->oap->op_type != OP_NOP ? DOCMD_KEEPLINE : 0);
  36.   
  37.       /* If 'insertmode' changed, enter or exit Insert mode */
  38. --- 5450,5456 ----
  39.       old_p_im = p_im;
  40.   
  41.       /* get a command line and execute it */
  42. !     cmd_result = do_cmdline(NULL, getexline, NULL,
  43.                   cap->oap->op_type != OP_NOP ? DOCMD_KEEPLINE : 0);
  44.   
  45.       /* If 'insertmode' changed, enter or exit Insert mode */
  46. ***************
  47. *** 5461,5472 ****
  48.           restart_edit = 0;
  49.       }
  50.   
  51. !     /* The start of the operator may have become invalid by the Ex
  52. !      * command. */
  53. !     if (cap->oap->op_type != OP_NOP
  54.           && (cap->oap->start.lnum > curbuf->b_ml.ml_line_count
  55.               || cap->oap->start.col >
  56. !                    (colnr_T)STRLEN(ml_get(cap->oap->start.lnum))))
  57.           clearopbeep(cap->oap);
  58.       }
  59.   }
  60. --- 5462,5478 ----
  61.           restart_edit = 0;
  62.       }
  63.   
  64. !     if (cmd_result == FAIL)
  65. !         /* The Ex command failed, do not execute the operator. */
  66. !         clearop(cap->oap);
  67. !     else if (cap->oap->op_type != OP_NOP
  68.           && (cap->oap->start.lnum > curbuf->b_ml.ml_line_count
  69.               || cap->oap->start.col >
  70. !                    (colnr_T)STRLEN(ml_get(cap->oap->start.lnum))
  71. !             || did_emsg
  72. !             ))
  73. !         /* The start of the operator has become invalid by the Ex command.
  74. !          */
  75.           clearopbeep(cap->oap);
  76.       }
  77.   }
  78. *** ../vim-7.3.878/src/version.c    2013-04-05 15:39:41.000000000 +0200
  79. --- src/version.c    2013-04-05 16:56:43.000000000 +0200
  80. ***************
  81. *** 730,731 ****
  82. --- 730,733 ----
  83.   {   /* Add new patch number below this line */
  84. + /**/
  85. +     879,
  86.   /**/
  87.  
  88. -- 
  89. ~
  90. ~
  91. ~
  92. ".signature" 4 lines, 50 characters written
  93.  
  94.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  95. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  96. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  97.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  98.