commit 8809c59ffd7df658384f6cb9e6f51d43b48efe14
parent 28157738e3de7675a7527f6e4e3fb01e6d30e1bf
Author: Justin M. Keyes <justinkz@gmail.com>
Date: Sat, 11 Oct 2025 15:54:36 -0400
Merge #36126 vim-patch:8.2.{4851,4878},9.0.1427
Diffstat:
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/nvim/eval/list.c b/src/nvim/eval/list.c
@@ -235,7 +235,9 @@ static void filter_map_string(const char *str, filtermap_T filtermap, typval_T *
};
set_vim_var_nr(VV_KEY, idx);
- typval_T newtv;
+ typval_T newtv = {
+ .v_type = VAR_UNKNOWN,
+ };
bool rem;
if (filter_map_one(&tv, expr, filtermap, &newtv, &rem) == FAIL
|| did_emsg) {
diff --git a/src/nvim/ex_session.c b/src/nvim/ex_session.c
@@ -710,6 +710,7 @@ static int makeopens(FILE *fd, char *dirnow)
// Assume "tabpages" is in 'sessionoptions'. If not then we only do
// "curtab" and bail out of the loop.
+ bool restore_height_width = false;
FOR_ALL_TABS(tp) {
bool need_tabnext = false;
int cnr = 1;
@@ -810,6 +811,7 @@ static int makeopens(FILE *fd, char *dirnow)
"set winwidth=1\n") < 0) {
return FAIL;
}
+ restore_height_width = true;
}
if (nr > 1 && ses_winsizes(fd, restore_size, tab_firstwin) == FAIL) {
return FAIL;
@@ -900,7 +902,7 @@ static int makeopens(FILE *fd, char *dirnow)
PUTLINE_FAIL("let &shortmess = s:shortmess_save");
}
- if (tab_firstwin != NULL && tab_firstwin->w_next != NULL) {
+ if (restore_height_width) {
// Restore 'winminheight' and 'winminwidth'.
PUTLINE_FAIL("let &winminheight = s:save_winminheight");
PUTLINE_FAIL("let &winminwidth = s:save_winminwidth");
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c
@@ -15050,7 +15050,7 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm
int subidx;
int bytelen;
- if (t->state->c <= NFA_BACKREF9) {
+ if (t->state->c >= NFA_BACKREF1 && t->state->c <= NFA_BACKREF9) {
subidx = t->state->c - NFA_BACKREF1 + 1;
result = match_backref(&t->subs.norm, subidx, &bytelen);
} else {