0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 7.4.2357

Problem:    Attempt to read history entry while not initialized.
Solution:   Skip when the index is negative.
This commit is contained in:
Bram Moolenaar
2016-09-09 21:42:36 +02:00
parent ea683da58c
commit 46643713dc
2 changed files with 3 additions and 1 deletions

View File

@@ -5762,7 +5762,7 @@ add_to_history(
*/
if (histype == HIST_SEARCH && in_map)
{
if (maptick == last_maptick)
if (maptick == last_maptick && hisidx[HIST_SEARCH] >= 0)
{
/* Current line is from the same mapping, remove it */
hisptr = &history[HIST_SEARCH][hisidx[HIST_SEARCH]];