diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-01-20 20:22:30 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-01-20 20:22:30 +0100 |
commit | 98a336dd497d3422e7efeef9f24cc9e25aeb8a49 (patch) | |
tree | 63869e51ae95905c656e70e3e95665b64da12a70 /src/edit.c | |
parent | ca33eb256eb910af05e8c9852bc9f716cece1f5c (diff) | |
download | vim-git-98a336dd497d3422e7efeef9f24cc9e25aeb8a49.tar.gz |
patch 8.2.0133: invalid memory access with search commandv8.2.0133
Problem: Invalid memory access with search command.
Solution: When :normal runs out of characters in bracketed paste mode break
out of the loop.(closes #5511)
Diffstat (limited to 'src/edit.c')
-rw-r--r-- | src/edit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/edit.c b/src/edit.c index 8160fe569..f2ae425fa 100644 --- a/src/edit.c +++ b/src/edit.c @@ -4959,9 +4959,9 @@ bracketed_paste(paste_mode_T mode, int drop, garray_T *gap) do c = vgetc(); while (c == K_IGNORE || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR); - if (c == NUL || got_int) + if (c == NUL || got_int || (ex_normal_busy > 0 && c == Ctrl_C)) // When CTRL-C was encountered the typeahead will be flushed and we - // won't get the end sequence. + // won't get the end sequence. Except when using ":normal". break; if (has_mbyte) |