Patch 7.4.973
Problem:    When pasting on the command line line breaks result in literal
            <CR> characters. This makes pasting a long file name difficult.
Solution:   Skip the characters.
Files:      src/ex_getln.c, src/ops.c


*** ../vim-7.4.972/src/ex_getln.c       2015-11-21 16:28:47.405303477 +0100
--- src/ex_getln.c      2015-12-17 13:48:21.339283010 +0100
***************
*** 3068,3079 ****
  #endif
  
  /*
!  * paste a yank register into the command line.
!  * used by CTRL-R command in command-line mode
   * insert_reg() can't be used here, because special characters from the
   * register contents will be interpreted as commands.
   *
!  * return FAIL for failure, OK otherwise
   */
      static int
  cmdline_paste(regname, literally, remcr)
--- 3068,3079 ----
  #endif
  
  /*
!  * Paste a yank register into the command line.
!  * Used by CTRL-R command in command-line mode.
   * insert_reg() can't be used here, because special characters from the
   * register contents will be interpreted as commands.
   *
!  * Return FAIL for failure, OK otherwise.
   */
      static int
  cmdline_paste(regname, literally, remcr)
*** ../vim-7.4.972/src/ops.c    2015-11-19 17:56:09.434210164 +0100
--- src/ops.c   2015-12-17 13:59:51.264056574 +0100
***************
*** 1577,1583 ****
  cmdline_paste_reg(regname, literally, remcr)
      int regname;
      int literally;    /* Insert text literally instead of "as typed" */
!     int remcr;                /* don't add trailing CR */
  {
      long      i;
  
--- 1577,1583 ----
  cmdline_paste_reg(regname, literally, remcr)
      int regname;
      int literally;    /* Insert text literally instead of "as typed" */
!     int remcr;                /* don't add CR characters */
  {
      long      i;
  
***************
*** 1590,1601 ****
        cmdline_paste_str(y_current->y_array[i], literally);
  
        /* Insert ^M between lines and after last line if type is MLINE.
!        * Don't do this when "remcr" is TRUE and the next line is empty. */
!       if (y_current->y_type == MLINE
!               || (i < y_current->y_size - 1
!                   && !(remcr
!                       && i == y_current->y_size - 2
!                       && *y_current->y_array[i + 1] == NUL)))
            cmdline_paste_str((char_u *)"\r", literally);
  
        /* Check for CTRL-C, in case someone tries to paste a few thousand
--- 1590,1597 ----
        cmdline_paste_str(y_current->y_array[i], literally);
  
        /* Insert ^M between lines and after last line if type is MLINE.
!        * Don't do this when "remcr" is TRUE. */
!       if ((y_current->y_type == MLINE || i < y_current->y_size - 1) && !remcr)
            cmdline_paste_str((char_u *)"\r", literally);
  
        /* Check for CTRL-C, in case someone tries to paste a few thousand
*** ../vim-7.4.972/src/version.c        2015-12-13 15:08:53.079742503 +0100
--- src/version.c       2015-12-17 14:03:44.165618787 +0100
***************
*** 743,744 ****
--- 743,746 ----
  {   /* Add new patch number below this line */
+ /**/
+     973,
  /**/

-- 
The greatest lies of all time:
  (1) The check is in the mail.
  (2) We have a really challenging assignment for you.
  (3) I love you.
  (4) All bugs have been fixed.
  (5) This won't hurt a bit.
  (6) Honey, I just need to debug this program and be home in 5 minutes.
  (7) I have just sent you an e-mail about that.
  (8) Of course I'll respect you in the morning.
  (9) I'm from the government, and I'm here to help you.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui