Mercurial > vim
comparison src/edit.c @ 19147:06ef1e438ac8 v8.2.0133
patch 8.2.0133: invalid memory access with search command
Commit: https://github.com/vim/vim/commit/98a336dd497d3422e7efeef9f24cc9e25aeb8a49
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jan 20 20:22:30 2020 +0100
patch 8.2.0133: invalid memory access with search command
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 20 Jan 2020 20:30:04 +0100 |
parents | bcbc9fe665b5 |
children | f12eda320c78 |
comparison
equal
deleted
inserted
replaced
19146:ba690b26dc16 | 19147:06ef1e438ac8 |
---|---|
4957 if (end == NULL && vpeekc() == NUL) | 4957 if (end == NULL && vpeekc() == NUL) |
4958 break; | 4958 break; |
4959 do | 4959 do |
4960 c = vgetc(); | 4960 c = vgetc(); |
4961 while (c == K_IGNORE || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR); | 4961 while (c == K_IGNORE || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR); |
4962 if (c == NUL || got_int) | 4962 if (c == NUL || got_int || (ex_normal_busy > 0 && c == Ctrl_C)) |
4963 // When CTRL-C was encountered the typeahead will be flushed and we | 4963 // When CTRL-C was encountered the typeahead will be flushed and we |
4964 // won't get the end sequence. | 4964 // won't get the end sequence. Except when using ":normal". |
4965 break; | 4965 break; |
4966 | 4966 |
4967 if (has_mbyte) | 4967 if (has_mbyte) |
4968 idx += (*mb_char2bytes)(c, buf + idx); | 4968 idx += (*mb_char2bytes)(c, buf + idx); |
4969 else | 4969 else |