diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-12-11 08:48:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-11 08:48:00 +0800 |
commit | 3dadd3aca5af4d09d0acbb027098b1a2c889e433 (patch) | |
tree | cd665467df862e420ed7697da6174f60466456e3 /src/nvim/ex_getln.c | |
parent | 224473546c95f17c45afc54fe8b4ef5f0e000974 (diff) | |
download | rneovim-3dadd3aca5af4d09d0acbb027098b1a2c889e433.tar.gz rneovim-3dadd3aca5af4d09d0acbb027098b1a2c889e433.tar.bz2 rneovim-3dadd3aca5af4d09d0acbb027098b1a2c889e433.zip |
vim-patch:8.2.2870: CmdlineChange event triggered twice for CTRL-R (#21361)
Problem: CmdlineChange event triggered twice for CTRL-R.
Solution: Return CMDLINE_NOT_CHANGED from cmdline_insert_reg().
(closes vim/vim#8219)
https://github.com/vim/vim/commit/796139ae3ac89e27ee96dce3c7fdb87d8c839f53
Cherry-pick Test_cmdline_map_cmdlineChanged() from patch 8.2.2851.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r-- | src/nvim/ex_getln.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 8fd7cb08f0..395cb5d98a 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -1609,7 +1609,8 @@ static int command_line_insert_reg(CommandLineState *s) ccline.special_char = NUL; redrawcmd(); - return CMDLINE_CHANGED; + // The text has been stuffed, the command line didn't change yet. + return CMDLINE_NOT_CHANGED; } /// Handle the Left and Right mouse clicks in the command-line mode. |