forked from aniani/vim
patch 9.1.0372: Calling CLEAR_FIELD() on the same struct twice
Problem: Calling CLEAR_FIELD() on the same struct twice. Solution: Remove the second CLEAR_FIELD(). Move the assignment of cookie.sourceing_lnum (zeertzjq). closes: #14627 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
f6c1fb20e3
commit
f68517c167
@@ -1273,7 +1273,7 @@ cmd_source(char_u *fname, exarg_T *eap)
|
|||||||
emsg(_(e_argument_required));
|
emsg(_(e_argument_required));
|
||||||
else
|
else
|
||||||
// source ex commands from the current buffer
|
// source ex commands from the current buffer
|
||||||
do_source_ext(NULL, FALSE, FALSE, NULL, eap, clearvars);
|
do_source_ext(NULL, FALSE, DOSO_NONE, NULL, eap, clearvars);
|
||||||
}
|
}
|
||||||
else if (eap != NULL && eap->forceit)
|
else if (eap != NULL && eap->forceit)
|
||||||
// ":source!": read Normal mode commands
|
// ":source!": read Normal mode commands
|
||||||
@@ -1424,8 +1424,6 @@ do_source_buffer_init(source_cookie_T *sp, exarg_T *eap)
|
|||||||
char_u *line = NULL;
|
char_u *line = NULL;
|
||||||
char_u *fname;
|
char_u *fname;
|
||||||
|
|
||||||
CLEAR_FIELD(*sp);
|
|
||||||
|
|
||||||
if (curbuf == NULL)
|
if (curbuf == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
@@ -1453,6 +1451,8 @@ do_source_buffer_init(source_cookie_T *sp, exarg_T *eap)
|
|||||||
}
|
}
|
||||||
sp->buf_lnum = 0;
|
sp->buf_lnum = 0;
|
||||||
sp->source_from_buf = TRUE;
|
sp->source_from_buf = TRUE;
|
||||||
|
// When sourcing a range of lines from a buffer, use buffer line number.
|
||||||
|
sp->sourcing_lnum = eap->line1 - 1;
|
||||||
|
|
||||||
return fname;
|
return fname;
|
||||||
|
|
||||||
@@ -1641,13 +1641,6 @@ do_source_ext(
|
|||||||
cookie.fileformat = EOL_UNKNOWN;
|
cookie.fileformat = EOL_UNKNOWN;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (fname == NULL)
|
|
||||||
// When sourcing a range of lines from a buffer, use the buffer line
|
|
||||||
// number.
|
|
||||||
cookie.sourcing_lnum = eap->line1 - 1;
|
|
||||||
else
|
|
||||||
cookie.sourcing_lnum = 0;
|
|
||||||
|
|
||||||
#ifdef FEAT_EVAL
|
#ifdef FEAT_EVAL
|
||||||
// Check if this script has a breakpoint.
|
// Check if this script has a breakpoint.
|
||||||
cookie.breakpoint = dbg_find_breakpoint(TRUE, fname_exp, (linenr_T)0);
|
cookie.breakpoint = dbg_find_breakpoint(TRUE, fname_exp, (linenr_T)0);
|
||||||
|
@@ -704,6 +704,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
372,
|
||||||
/**/
|
/**/
|
||||||
371,
|
371,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user