Patch 8.0.1787
Problem:    Cannot insert the whole cursor line.
Solution:   Make CTRL-R CTRL-L work. (Andy Massimino, closes #2857)
Files:      runtime/doc/cmdline.txt, src/ex_getln.c, src/ops.c,
            src/testdir/test_cmdline.vim


*** ../vim-8.0.1786/runtime/doc/cmdline.txt     2017-09-10 18:16:16.511727661 
+0200
--- runtime/doc/cmdline.txt     2018-05-01 19:10:26.615060740 +0200
***************
*** 175,186 ****
--- 175,188 ----
  CTRL-R CTRL-P                         *c_CTRL-R_CTRL-P* *c_<C-R>_<C-P>*
  CTRL-R CTRL-W                         *c_CTRL-R_CTRL-W* *c_<C-R>_<C-W>*
  CTRL-R CTRL-A                         *c_CTRL-R_CTRL-A* *c_<C-R>_<C-A>*
+ CTRL-R CTRL-L                         *c_CTRL-R_CTRL-L* *c_<C-R>_<C-L>*
                Insert the object under the cursor:
                        CTRL-F  the Filename under the cursor
                        CTRL-P  the Filename under the cursor, expanded with
                                'path' as in |gf|
                        CTRL-W  the Word under the cursor
                        CTRL-A  the WORD under the cursor; see |WORD|
+                       CTRL-L  the line under the cursor
  
                When 'incsearch' is set the cursor position at the end of the
                currently displayed match is used.  With CTRL-W the part of
***************
*** 192,199 ****
  
                                        *c_CTRL-R_CTRL-R* *c_<C-R>_<C-R>*
                                        *c_CTRL-R_CTRL-O* *c_<C-R>_<C-O>*
! CTRL-R CTRL-R {0-9a-z"%#:-=. CTRL-F CTRL-P CTRL-W CTRL-A}
! CTRL-R CTRL-O {0-9a-z"%#:-=. CTRL-F CTRL-P CTRL-W CTRL-A}
                Insert register or object under the cursor.  Works like
                |c_CTRL-R| but inserts the text literally.  For example, if
                register a contains "xy^Hz" (where ^H is a backspace),
--- 194,201 ----
  
                                        *c_CTRL-R_CTRL-R* *c_<C-R>_<C-R>*
                                        *c_CTRL-R_CTRL-O* *c_<C-R>_<C-O>*
! CTRL-R CTRL-R {0-9a-z"%#:-=. CTRL-F CTRL-P CTRL-W CTRL-A CTRL-L}
! CTRL-R CTRL-O {0-9a-z"%#:-=. CTRL-F CTRL-P CTRL-W CTRL-A CTRL-L}
                Insert register or object under the cursor.  Works like
                |c_CTRL-R| but inserts the text literally.  For example, if
                register a contains "xy^Hz" (where ^H is a backspace),
***************
*** 229,237 ****
                the clipboard. |modeless-selection|
                If there is no selection CTRL-Y is inserted as a character.
  
! CTRL-J                                        *c_CTRL-J* *c_<NL>* *c_<CR>* 
*c_CR*
  <CR> or <NL>  start entered command
!                                                       *c_<Esc>* *c_Esc*
  <Esc>         When typed and 'x' not present in 'cpoptions', quit
                Command-line mode without executing.  In macros or when 'x'
                present in 'cpoptions', start entered command.
--- 231,240 ----
                the clipboard. |modeless-selection|
                If there is no selection CTRL-Y is inserted as a character.
  
! CTRL-M or CTRL-J              *c_CTRL-M* *c_CTRL-J* *c_<NL>* *c_<CR>* *c_CR*
  <CR> or <NL>  start entered command
! 
! CTRL-[                                                *c_CTRL-[* *c_<Esc>* 
*c_Esc*
  <Esc>         When typed and 'x' not present in 'cpoptions', quit
                Command-line mode without executing.  In macros or when 'x'
                present in 'cpoptions', start entered command.
*** ../vim-8.0.1786/src/ex_getln.c      2018-04-28 13:56:04.831260649 +0200
--- src/ex_getln.c      2018-05-01 19:10:26.619060714 +0200
***************
*** 3299,3305 ****
      /* check for valid regname; also accept special characters for CTRL-R in
       * the command line */
      if (regname != Ctrl_F && regname != Ctrl_P && regname != Ctrl_W
!           && regname != Ctrl_A && !valid_yank_reg(regname, FALSE))
        return FAIL;
  
      /* A register containing CTRL-R can cause an endless loop.  Allow using
--- 3299,3306 ----
      /* check for valid regname; also accept special characters for CTRL-R in
       * the command line */
      if (regname != Ctrl_F && regname != Ctrl_P && regname != Ctrl_W
!           && regname != Ctrl_A && regname != Ctrl_L
!           && !valid_yank_reg(regname, FALSE))
        return FAIL;
  
      /* A register containing CTRL-R can cause an endless loop.  Allow using
*** ../vim-8.0.1786/src/ops.c   2018-04-30 17:20:58.937028966 +0200
--- src/ops.c   2018-05-01 19:10:26.619060714 +0200
***************
*** 1573,1578 ****
--- 1573,1586 ----
            *allocated = TRUE;
            return TRUE;
  
+       case Ctrl_L:            /* Line under cursor */
+           if (!errmsg)
+               return FALSE;
+ 
+           *argp = ml_get_buf(curwin->w_buffer,
+                       curwin->w_cursor.lnum, FALSE);
+           return TRUE;
+ 
        case '_':               /* black hole: always empty */
            *argp = (char_u *)"";
            return TRUE;
*** ../vim-8.0.1786/src/testdir/test_cmdline.vim        2018-04-07 
19:09:05.791413434 +0200
--- src/testdir/test_cmdline.vim        2018-05-01 19:10:26.619060714 +0200
***************
*** 306,311 ****
--- 306,314 ----
    call feedkeys("ft:aaa \<C-R>\<C-F> bbb\<C-B>\"\<CR>", 'tx')
    call assert_equal('"aaa /tmp/some bbb', @:)
  
+   call feedkeys(":aaa \<C-R>\<C-L> bbb\<C-B>\"\<CR>", 'tx')
+   call assert_equal('"aaa '.getline(1).' bbb', @:)
+ 
    set incsearch
    call feedkeys("fy:aaa veryl\<C-R>\<C-W> bbb\<C-B>\"\<CR>", 'tx')
    call assert_equal('"aaa verylongword bbb', @:)
*** ../vim-8.0.1786/src/version.c       2018-05-01 18:47:52.992188456 +0200
--- src/version.c       2018-05-01 19:11:38.106599688 +0200
***************
*** 763,764 ****
--- 763,766 ----
  {   /* Add new patch number below this line */
+ /**/
+     1787,
  /**/

-- 
"Shoot for the moon. Even if you miss, you'll land among the stars."

 /// 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