aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraichoo <raichoo@googlemail.com>2017-03-26 23:15:53 +0200
committerJustin M. Keyes <justinkz@gmail.com>2017-03-26 23:15:53 +0200
commitedc80f6b46f51ea1137289301914c0f90db19295 (patch)
tree12ec598af9e03786d6853dd500ea30bf08d3e071
parentf9a31e98505c0f5e83dd3ba957fbd0f4b150d30c (diff)
downloadrneovim-edc80f6b46f51ea1137289301914c0f90db19295.tar.gz
rneovim-edc80f6b46f51ea1137289301914c0f90db19295.tar.bz2
rneovim-edc80f6b46f51ea1137289301914c0f90db19295.zip
vim-patch:7.4.2357 (#6354)
Problem: Attempt to read history entry while not initialized. Solution: Skip when the index is negative. https://github.com/vim/vim/commit/46643713dc6bb04b4e84986b1763ef309e960161
-rw-r--r--src/nvim/ex_getln.c4
-rw-r--r--src/nvim/version.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 58979c0e43..8758a63bce 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -4677,8 +4677,8 @@ add_to_history (
* down, only lines that were added.
*/
if (histype == HIST_SEARCH && in_map) {
- if (maptick == last_maptick) {
- /* Current line is from the same mapping, remove it */
+ if (maptick == last_maptick && hisidx[HIST_SEARCH] >= 0) {
+ // Current line is from the same mapping, remove it
hisptr = &history[HIST_SEARCH][hisidx[HIST_SEARCH]];
hist_free_entry(hisptr);
--hisnum[histype];
diff --git a/src/nvim/version.c b/src/nvim/version.c
index a354634218..a911e8ebc3 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -84,7 +84,7 @@ static int included_patches[] = {
// 2360,
// 2359 NA
// 2358 NA
- // 2357,
+ 2357,
// 2356,
2355,
// 2354,