Patch 8.2.2870
Problem:    CmdlineChange event triggered twice for CTRL-R.
Solution:   Return CMDLINE_NOT_CHANGED from cmdline_insert_reg().
            (closes #8219)
Files:      src/ex_getln.c, src/testdir/test_cmdline.vim


*** ../vim-8.2.2869/src/ex_getln.c      2021-05-15 15:09:02.144699051 +0200
--- src/ex_getln.c      2021-05-18 21:36:28.647614907 +0200
***************
*** 1253,1260 ****
        }
  #endif
      }
      redrawcmd();
!     return CMDLINE_CHANGED;
  }
  
  /*
--- 1253,1263 ----
        }
  #endif
      }
+     // remove the double quote
      redrawcmd();
! 
!     // The text has been stuffed, the command line didn't change yet.
!     return CMDLINE_NOT_CHANGED;
  }
  
  /*
*** ../vim-8.2.2869/src/testdir/test_cmdline.vim        2021-05-15 
13:19:12.195816386 +0200
--- src/testdir/test_cmdline.vim        2021-05-18 21:35:58.399747045 +0200
***************
*** 1810,1815 ****
--- 1810,1821 ----
    call feedkeys(":\<F1>\<CR>", 'xt')
    call assert_equal(['l', 'ls'], g:log)
  
+   let @b = 'b'
+   cnoremap <F1> a<C-R>b
+   let g:log = []
+   call feedkeys(":\<F1>\<CR>", 'xt')
+   call assert_equal(['a', 'ab'], g:log)
+ 
    unlet g:log
    cunmap <F1>
    augroup test
*** ../vim-8.2.2869/src/version.c       2021-05-18 19:18:58.840868977 +0200
--- src/version.c       2021-05-18 21:38:26.891096033 +0200
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     2870,
  /**/

-- 
Just think of all the things we haven't thought of yet.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202105181939.14IJdR7b4123427%40masaka.moolenaar.net.

Raspunde prin e-mail lui