mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.0960: cannot use :import in legacy Vim script
Problem: Cannot use :import in legacy Vim script. Solution: Support :import in any Vim script.
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
#include "vim9.h"
|
||||
|
||||
static char e_needs_vim9[] = N_("E1042: import/export can only be used in vim9script");
|
||||
static char e_needs_vim9[] = N_("E1042: export can only be used in vim9script");
|
||||
|
||||
int
|
||||
in_vim9script(void)
|
||||
@@ -141,16 +141,10 @@ free_imports(int sid)
|
||||
void
|
||||
ex_import(exarg_T *eap)
|
||||
{
|
||||
if (current_sctx.sc_version != SCRIPT_VERSION_VIM9)
|
||||
emsg(_(e_needs_vim9));
|
||||
else
|
||||
{
|
||||
char_u *cmd_end = handle_import(eap->arg, NULL,
|
||||
current_sctx.sc_sid, NULL);
|
||||
char_u *cmd_end = handle_import(eap->arg, NULL, current_sctx.sc_sid, NULL);
|
||||
|
||||
if (cmd_end != NULL)
|
||||
eap->nextcmd = check_nextcmd(cmd_end);
|
||||
}
|
||||
if (cmd_end != NULL)
|
||||
eap->nextcmd = check_nextcmd(cmd_end);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user