mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.2357 (#6354)
Problem: Attempt to read history entry while not initialized.
Solution: Skip when the index is negative.
46643713dc
This commit is contained in:
parent
f9a31e9850
commit
edc80f6b46
@ -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];
|
||||
|
@ -84,7 +84,7 @@ static int included_patches[] = {
|
||||
// 2360,
|
||||
// 2359 NA
|
||||
// 2358 NA
|
||||
// 2357,
|
||||
2357,
|
||||
// 2356,
|
||||
2355,
|
||||
// 2354,
|
||||
|
Loading…
Reference in New Issue
Block a user