mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 23:38:17 +00: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:
@@ -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];
|
||||
|
Reference in New Issue
Block a user