File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -18259,11 +18259,21 @@ f_undofile(argvars, rettv)
1825918259 rettv->v_type = VAR_STRING;
1826018260#ifdef FEAT_PERSISTENT_UNDO
1826118261 {
18262- char_u *ffname = FullName_save( get_tv_string(&argvars[0]), FALSE );
18262+ char_u *fname = get_tv_string(&argvars[0]);
1826318263
18264- if (ffname != NULL)
18265- rettv->vval.v_string = u_get_undo_file_name(ffname, FALSE);
18266- vim_free(ffname);
18264+ if (*fname == NUL)
18265+ {
18266+ /* If there is no file name there will be no undo file. */
18267+ rettv->vval.v_string = NULL;
18268+ }
18269+ else
18270+ {
18271+ char_u *ffname = FullName_save(fname, FALSE);
18272+
18273+ if (ffname != NULL)
18274+ rettv->vval.v_string = u_get_undo_file_name(ffname, FALSE);
18275+ vim_free(ffname);
18276+ }
1826718277 }
1826818278#else
1826918279 rettv->vval.v_string = NULL;
Original file line number Diff line number Diff line change @@ -714,6 +714,8 @@ static char *(features[]) =
714714
715715static int included_patches [] =
716716{ /* Add new patch number below this line */
717+ /**/
718+ 512 ,
717719/**/
718720 511 ,
719721/**/
You can’t perform that action at this time.
0 commit comments