vim-patch:9.1.0216: Error on exit with EXITFREE and 'winfixbuf' (#28070)

Problem:  Error on exit with EXITFREE and 'winfixbuf'.
Solution: Handle DT_FREE before checking for 'winfixbuf'.
          (zeertzjq)

closes: vim/vim#14314

620e85265c
This commit is contained in:
zeertzjq
2024-03-28 17:52:06 +08:00
committed by GitHub
parent 2dea0ea820
commit 67596c42eb
2 changed files with 21 additions and 9 deletions

View File

@@ -290,10 +290,6 @@ void set_buflocal_tfu_callback(buf_T *buf)
/// @param verbose print "tag not found" message
void do_tag(char *tag, int type, int count, int forceit, bool verbose)
{
if (postponed_split == 0 && !check_can_set_curbuf_forceit(forceit)) {
return;
}
taggy_T *tagstack = curwin->w_tagstack;
int tagstackidx = curwin->w_tagstackidx;
int tagstacklen = curwin->w_tagstacklen;
@@ -320,11 +316,6 @@ void do_tag(char *tag, int type, int count, int forceit, bool verbose)
static char **matches = NULL;
static int flags;
if (tfu_in_use) {
emsg(_(e_cannot_modify_tag_stack_within_tagfunc));
return;
}
#ifdef EXITFREE
if (type == DT_FREE) {
// remove the list of matches
@@ -334,6 +325,15 @@ void do_tag(char *tag, int type, int count, int forceit, bool verbose)
}
#endif
if (tfu_in_use) {
emsg(_(e_cannot_modify_tag_stack_within_tagfunc));
return;
}
if (postponed_split == 0 && !check_can_set_curbuf_forceit(forceit)) {
return;
}
if (type == DT_HELP) {
type = DT_TAG;
no_regexp = true;