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:
@@ -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]];
|
||||
|
Reference in New Issue
Block a user