Compare commits

...

9 Commits

Author SHA1 Message Date
Bram Moolenaar
14944c04bd patch 8.2.1663: options window entries cannot be translated
Problem:    Options window entries cannot be translated.
Solution:   Use AddOption() for all explanations. (closes #6800)
2020-09-11 20:51:26 +02:00
Bram Moolenaar
0e655111e9 patch 8.2.1662: :mksession does not restore shared terminal buffer properly
Problem:    :mksession does not restore shared terminal buffer properly.
Solution:   Keep a hashtab with terminal buffers. (Rob Pilling, closes #6930)
2020-09-11 20:36:36 +02:00
Bram Moolenaar
c6a67c92bc patch 8.2.1661: cannot connect to 127.0.0.1 for host with only IPv6 addresses
Problem:    Cannot connect to 127.0.0.1 for host with only IPv6 addresses.
Solution:   pass AI_V4MAPPED flag to getaddrinfo. (Filipe Brandenburger,
            closes #6931)
2020-09-11 19:28:19 +02:00
Bram Moolenaar
c0c71e9d98 patch 8.2.1660: assert functions require passing expected as first argument
Problem:    Assert functions require passing expected result as the first
            argument, which isn't obvious.
Solution:   Use a method, as in "runtest()->assert_equal(expected)".
2020-09-11 19:09:48 +02:00
Bram Moolenaar
96fdf4348a patch 8.2.1659: spellfile code not completely tested
Problem:    Spellfile code not completely tested.
Solution:   Add a few more test cases. (Yegappan Lakshmanan, closes #6929)
2020-09-11 18:11:50 +02:00
Bram Moolenaar
a810db3f17 patch 8.2.1658: expand('<stack>') has trailing ".."
Problem:    Expand('<stack>') has trailing "..".
Solution:   Remove the "..". (closes #6927)
2020-09-11 17:59:23 +02:00
Bram Moolenaar
8b848cafb0 patch 8.2.1657: Vim9: no proper error for nested ":def!"
Problem:    Vim9: no proper error for nested ":def!".
Solution:   Check for "!". (closes #6920)
2020-09-10 22:28:01 +02:00
Bram Moolenaar
dfa3d5524e patch 8.2.1656: Vim9: callstack wrong if :def function calls :def function
Problem:    Vim9: callstack wrong if :def function calls :def function.
Solution:   Set the line number before calling. (closes #6914)
2020-09-10 22:05:08 +02:00
Bram Moolenaar
895a7a472d patch 8.2.1655: cannot build with Strawberry Perl 5.32.0
Problem:    Cannot build with Strawberry Perl 5.32.0.
Solution:   Use Perl_sv_2pvbyte_flags. (closes #6921)
2020-09-10 21:36:11 +02:00
17 changed files with 893 additions and 710 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -977,8 +977,8 @@ channel_open(
CLEAR_FIELD(hints);
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
# ifdef AI_ADDRCONFIG
hints.ai_flags = AI_ADDRCONFIG;
# if defined(AI_ADDRCONFIG) && defined(AI_V4MAPPED)
hints.ai_flags = AI_ADDRCONFIG | AI_V4MAPPED;
# endif
// Set port number manually in order to prevent name resolution services
// from being invoked in the environment where AI_NUMERICSERV is not

View File

@@ -256,4 +256,6 @@ EXTERN char e_assert_fails_fourth_argument[]
INIT(= N_("E1115: assert_fails() fourth argument must be a number"));
EXTERN char e_assert_fails_fifth_argument[]
INIT(= N_("E1116: assert_fails() fifth argument must be a string"));
EXTERN char e_cannot_use_bang_with_nested_def[]
INIT(= N_("E1117: Cannot use ! with nested :def"));
#endif

View File

@@ -81,7 +81,7 @@ hash_clear(hashtab_T *ht)
vim_free(ht->ht_array);
}
#if defined(FEAT_SPELL) || defined(PROTO)
#if defined(FEAT_SPELL) || defined(FEAT_TERMINAL) || defined(PROTO)
/*
* Free the array of a hash table and all the keys it contains. The keys must
* have been allocated. "off" is the offset from the start of the allocate

View File

@@ -241,6 +241,9 @@ typedef int perl_key;
# else
# define Perl_sv_2pv dll_Perl_sv_2pv
# endif
# if (PERL_REVISION == 5) && (PERL_VERSION >= 32)
# define Perl_sv_2pvbyte_flags dll_Perl_sv_2pvbyte_flags
# endif
# define Perl_sv_2pvbyte dll_Perl_sv_2pvbyte
# define Perl_sv_bless dll_Perl_sv_bless
# if (PERL_REVISION == 5) && (PERL_VERSION >= 8)
@@ -397,6 +400,9 @@ static char* (*Perl_sv_2pv_nolen)(pTHX_ SV*);
static char* (*Perl_sv_2pv)(pTHX_ SV*, STRLEN*);
# endif
static char* (*Perl_sv_2pvbyte)(pTHX_ SV*, STRLEN*);
# if (PERL_REVISION == 5) && (PERL_VERSION >= 32)
static char* (*Perl_sv_2pvbyte_flags)(pTHX_ SV*, STRLEN*, I32);
# endif
static SV* (*Perl_sv_bless)(pTHX_ SV*, HV*);
# if (PERL_REVISION == 5) && (PERL_VERSION >= 8)
static void (*Perl_sv_catpvn_flags)(pTHX_ SV* , const char*, STRLEN, I32);
@@ -553,6 +559,9 @@ static struct {
{"Perl_sv_2pv", (PERL_PROC*)&Perl_sv_2pv},
# endif
{"Perl_sv_2pvbyte", (PERL_PROC*)&Perl_sv_2pvbyte},
# if (PERL_REVISION == 5) && (PERL_VERSION >= 32)
{"Perl_sv_2pvbyte_flags", (PERL_PROC*)&Perl_sv_2pvbyte_flags},
# endif
# ifdef PERL589_OR_LATER
{"Perl_sv_2iv_flags", (PERL_PROC*)&Perl_sv_2iv_flags},
{"Perl_newXS_flags", (PERL_PROC*)&Perl_newXS_flags},

View File

@@ -2,7 +2,7 @@
void init_job_options(jobopt_T *opt);
buf_T *term_start(typval_T *argvar, char **argv, jobopt_T *opt, int flags);
void ex_terminal(exarg_T *eap);
int term_write_session(FILE *fd, win_T *wp);
int term_write_session(FILE *fd, win_T *wp, hashtab_T *terminal_bufs);
int term_should_restore(buf_T *buf);
void free_terminal(buf_T *buf);
void free_unused_terminals(void);

View File

@@ -144,7 +144,8 @@ estack_sfile(estack_arg_T which UNUSED)
entry = ((estack_T *)exestack.ga_data) + idx;
if (entry->es_name != NULL)
{
long lnum = 0;
long lnum = 0;
char *dots;
len = STRLEN(entry->es_name) + 15;
type_name = "";
@@ -165,16 +166,16 @@ estack_sfile(estack_arg_T which UNUSED)
lnum = which == ESTACK_STACK ? SOURCING_LNUM : 0;
else
lnum = entry->es_lnum;
dots = idx == exestack.ga_len - 1 ? "" : "..";
if (lnum == 0)
// For the bottom entry of <sfile>: do not add the line number,
// it is used in <slnum>. Also leave it out when the number is
// not set.
vim_snprintf((char *)ga.ga_data + ga.ga_len, len, "%s%s%s",
type_name, entry->es_name,
idx == exestack.ga_len - 1 ? "" : "..");
type_name, entry->es_name, dots);
else
vim_snprintf((char *)ga.ga_data + ga.ga_len, len, "%s%s[%ld]..",
type_name, entry->es_name, lnum);
vim_snprintf((char *)ga.ga_data + ga.ga_len, len, "%s%s[%ld]%s",
type_name, entry->es_name, lnum, dots);
ga.ga_len += (int)STRLEN((char *)ga.ga_data + ga.ga_len);
}
}

View File

@@ -305,8 +305,12 @@ put_view(
win_T *wp,
int add_edit, // add ":edit" command to view
unsigned *flagp, // vop_flags or ssop_flags
int current_arg_idx) // current argument index of the window, use
// -1 if unknown
int current_arg_idx // current argument index of the window, use
// -1 if unknown
#ifdef FEAT_TERMINAL
, hashtab_T *terminal_bufs
#endif
)
{
win_T *save_curwin;
int f;
@@ -349,7 +353,7 @@ put_view(
# ifdef FEAT_TERMINAL
if (bt_terminal(wp->w_buffer))
{
if (term_write_session(fd, wp) == FAIL)
if (term_write_session(fd, wp, terminal_bufs) == FAIL)
return FAIL;
}
else
@@ -588,6 +592,12 @@ makeopens(
frame_T *tab_topframe;
int cur_arg_idx = 0;
int next_arg_idx = 0;
int ret = FAIL;
#ifdef FEAT_TERMINAL
hashtab_T terminal_bufs;
hash_init(&terminal_bufs);
#endif
if (ssop_flags & SSOP_BUFFERS)
only_save_windows = FALSE; // Save ALL buffers
@@ -596,25 +606,25 @@ makeopens(
// sessionable variables.
#ifdef FEAT_EVAL
if (put_line(fd, "let v:this_session=expand(\"<sfile>:p\")") == FAIL)
return FAIL;
goto fail;
if (ssop_flags & SSOP_GLOBALS)
if (store_session_globals(fd) == FAIL)
return FAIL;
goto fail;
#endif
// Close all windows and tabs but one.
if (put_line(fd, "silent only") == FAIL)
return FAIL;
goto fail;
if ((ssop_flags & SSOP_TABPAGES)
&& put_line(fd, "silent tabonly") == FAIL)
return FAIL;
goto fail;
// Now a :cd command to the session directory or the current directory
if (ssop_flags & SSOP_SESDIR)
{
if (put_line(fd, "exe \"cd \" . escape(expand(\"<sfile>:p:h\"), ' ')")
== FAIL)
return FAIL;
goto fail;
}
else if (ssop_flags & SSOP_CURDIR)
{
@@ -625,7 +635,7 @@ makeopens(
|| put_eol(fd) == FAIL)
{
vim_free(sname);
return FAIL;
goto fail;
}
vim_free(sname);
}
@@ -633,27 +643,27 @@ makeopens(
// If there is an empty, unnamed buffer we will wipe it out later.
// Remember the buffer number.
if (put_line(fd, "if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == ''") == FAIL)
return FAIL;
goto fail;
if (put_line(fd, " let s:wipebuf = bufnr('%')") == FAIL)
return FAIL;
goto fail;
if (put_line(fd, "endif") == FAIL)
return FAIL;
goto fail;
// Now save the current files, current buffer first.
if (put_line(fd, "set shortmess=aoO") == FAIL)
return FAIL;
goto fail;
// the global argument list
if (ses_arglist(fd, "argglobal", &global_alist.al_ga,
!(ssop_flags & SSOP_CURDIR), &ssop_flags) == FAIL)
return FAIL;
goto fail;
if (ssop_flags & SSOP_RESIZE)
{
// Note: after the restore we still check it worked!
if (fprintf(fd, "set lines=%ld columns=%ld" , Rows, Columns) < 0
|| put_eol(fd) == FAIL)
return FAIL;
goto fail;
}
#ifdef FEAT_GUI
@@ -665,7 +675,7 @@ makeopens(
{
// Note: after the restore we still check it worked!
if (fprintf(fd, "winpos %d %d", x, y) < 0 || put_eol(fd) == FAIL)
return FAIL;
goto fail;
}
}
#endif
@@ -677,7 +687,7 @@ makeopens(
if (p_stal == 1 && first_tabpage->tp_next != NULL)
{
if (put_line(fd, "set stal=2") == FAIL)
return FAIL;
goto fail;
restore_stal = TRUE;
}
@@ -695,9 +705,9 @@ makeopens(
// later local options won't be copied to the new tabs.
FOR_ALL_TABPAGES(tp)
if (tp->tp_next != NULL && put_line(fd, "tabnew") == FAIL)
return FAIL;
goto fail;
if (first_tabpage->tp_next != NULL && put_line(fd, "tabrewind") == FAIL)
return FAIL;
goto fail;
}
for (tabnr = 1; ; ++tabnr)
{
@@ -739,13 +749,13 @@ makeopens(
)
{
if (need_tabnext && put_line(fd, "tabnext") == FAIL)
return FAIL;
goto fail;
need_tabnext = FALSE;
if (fputs("edit ", fd) < 0
|| ses_fname(fd, wp->w_buffer, &ssop_flags, TRUE)
== FAIL)
return FAIL;
goto fail;
if (!wp->w_arg_idx_invalid)
edited_win = wp;
break;
@@ -754,17 +764,17 @@ makeopens(
// If no file got edited create an empty tab page.
if (need_tabnext && put_line(fd, "tabnext") == FAIL)
return FAIL;
goto fail;
// Save current window layout.
if (put_line(fd, "set splitbelow splitright") == FAIL)
return FAIL;
goto fail;
if (ses_win_rec(fd, tab_topframe) == FAIL)
return FAIL;
goto fail;
if (!p_sb && put_line(fd, "set nosplitbelow") == FAIL)
return FAIL;
goto fail;
if (!p_spr && put_line(fd, "set nosplitright") == FAIL)
return FAIL;
goto fail;
// Check if window sizes can be restored (no windows omitted).
// Remember the window number of the current window after restoring.
@@ -781,7 +791,7 @@ makeopens(
// Go to the first window.
if (put_line(fd, "wincmd t") == FAIL)
return FAIL;
goto fail;
// If more than one window, see if sizes can be restored.
// First set 'winheight' and 'winwidth' to 1 to avoid the windows being
@@ -794,9 +804,9 @@ makeopens(
|| put_line(fd, "set winheight=1") == FAIL
|| put_line(fd, "set winminwidth=0") == FAIL
|| put_line(fd, "set winwidth=1") == FAIL)
return FAIL;
goto fail;
if (nr > 1 && ses_winsizes(fd, restore_size, tab_firstwin) == FAIL)
return FAIL;
goto fail;
// Restore the tab-local working directory if specified
// Do this before the windows, so that the window-local directory can
@@ -806,7 +816,7 @@ makeopens(
if (fputs("tcd ", fd) < 0
|| ses_put_fname(fd, tp->tp_localdir, &ssop_flags) == FAIL
|| put_eol(fd) == FAIL)
return FAIL;
goto fail;
did_lcd = TRUE;
}
@@ -815,11 +825,14 @@ makeopens(
{
if (!ses_do_win(wp))
continue;
if (put_view(fd, wp, wp != edited_win, &ssop_flags,
cur_arg_idx) == FAIL)
return FAIL;
if (put_view(fd, wp, wp != edited_win, &ssop_flags, cur_arg_idx
#ifdef FEAT_TERMINAL
, &terminal_bufs
#endif
) == FAIL)
goto fail;
if (nr > 1 && put_line(fd, "wincmd w") == FAIL)
return FAIL;
goto fail;
next_arg_idx = wp->w_arg_idx;
}
@@ -831,12 +844,12 @@ makeopens(
// Restore cursor to the current window if it's not the first one.
if (cnr > 1 && (fprintf(fd, "%dwincmd w", cnr) < 0
|| put_eol(fd) == FAIL))
return FAIL;
goto fail;
// Restore window sizes again after jumping around in windows, because
// the current window has a minimum size while others may not.
if (nr > 1 && ses_winsizes(fd, restore_size, tab_firstwin) == FAIL)
return FAIL;
goto fail;
// Don't continue in another tab page when doing only the current one
// or when at the last tab page.
@@ -848,10 +861,10 @@ makeopens(
{
if (fprintf(fd, "tabnext %d", tabpage_index(curtab)) < 0
|| put_eol(fd) == FAIL)
return FAIL;
goto fail;
}
if (restore_stal && put_line(fd, "set stal=1") == FAIL)
return FAIL;
goto fail;
// Now put the remaining buffers into the buffer list.
// This is near the end, so that when 'hidden' is set we don't create extra
@@ -872,38 +885,43 @@ makeopens(
if (fprintf(fd, "badd +%ld ", buf->b_wininfo == NULL ? 1L
: buf->b_wininfo->wi_fpos.lnum) < 0
|| ses_fname(fd, buf, &ssop_flags, TRUE) == FAIL)
return FAIL;
goto fail;
}
}
// Wipe out an empty unnamed buffer we started in.
if (put_line(fd, "if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0")
== FAIL)
return FAIL;
goto fail;
if (put_line(fd, " silent exe 'bwipe ' . s:wipebuf") == FAIL)
return FAIL;
goto fail;
if (put_line(fd, "endif") == FAIL)
return FAIL;
goto fail;
if (put_line(fd, "unlet! s:wipebuf") == FAIL)
return FAIL;
goto fail;
// Re-apply 'winheight', 'winwidth' and 'shortmess'.
if (fprintf(fd, "set winheight=%ld winwidth=%ld shortmess=%s",
p_wh, p_wiw, p_shm) < 0 || put_eol(fd) == FAIL)
return FAIL;
goto fail;
// Re-apply 'winminheight' and 'winminwidth'.
if (fprintf(fd, "set winminheight=%ld winminwidth=%ld",
p_wmh, p_wmw) < 0 || put_eol(fd) == FAIL)
return FAIL;
goto fail;
// Lastly, execute the x.vim file if it exists.
if (put_line(fd, "let s:sx = expand(\"<sfile>:p:r\").\"x.vim\"") == FAIL
|| put_line(fd, "if filereadable(s:sx)") == FAIL
|| put_line(fd, " exe \"source \" . fnameescape(s:sx)") == FAIL
|| put_line(fd, "endif") == FAIL)
return FAIL;
goto fail;
return OK;
ret = OK;
fail:
#ifdef FEAT_TERMINAL
hash_clear_all(&terminal_bufs, 0);
#endif
return ret;
}
/*
@@ -1084,6 +1102,11 @@ ex_mkrc(exarg_T *eap)
char_u *viewFile = NULL;
unsigned *flagp;
#endif
#ifdef FEAT_TERMINAL
hashtab_T terminal_bufs;
hash_init(&terminal_bufs);
#endif
if (eap->cmdidx == CMD_mksession || eap->cmdidx == CMD_mkview)
{
@@ -1240,8 +1263,11 @@ ex_mkrc(exarg_T *eap)
}
else
{
failed |= (put_view(fd, curwin, !using_vdir, flagp,
-1) == FAIL);
failed |= (put_view(fd, curwin, !using_vdir, flagp, -1
#ifdef FEAT_TERMINAL
, &terminal_bufs
#endif
) == FAIL);
}
if (put_line(fd, "let &so = s:so_save | let &siso = s:siso_save")
== FAIL)

View File

@@ -935,9 +935,30 @@ theend:
* Return FAIL if writing fails.
*/
int
term_write_session(FILE *fd, win_T *wp)
term_write_session(FILE *fd, win_T *wp, hashtab_T *terminal_bufs)
{
term_T *term = wp->w_buffer->b_term;
const int bufnr = wp->w_buffer->b_fnum;
term_T *term = wp->w_buffer->b_term;
if (wp->w_buffer->b_nwindows > 1)
{
// There are multiple views into this terminal buffer. We don't want to
// create the terminal multiple times. If it's the first time, create,
// otherwise link to the first buffer.
char id_as_str[NUMBUFLEN];
hashitem_T *entry;
vim_snprintf(id_as_str, sizeof(id_as_str), "%d", bufnr);
entry = hash_find(terminal_bufs, (char_u *)id_as_str);
if (!HASHITEM_EMPTY(entry))
{
// we've already opened this terminal buffer
if (fprintf(fd, "execute 'buffer ' . s:term_buf_%d", bufnr) < 0)
return FAIL;
return put_eol(fd);
}
}
// Create the terminal and run the command. This is not without
// risk, but let's assume the user only creates a session when this
@@ -951,6 +972,19 @@ term_write_session(FILE *fd, win_T *wp)
#endif
if (term->tl_command != NULL && fputs((char *)term->tl_command, fd) < 0)
return FAIL;
if (put_eol(fd) != OK)
return FAIL;
if (fprintf(fd, "let s:term_buf_%d = bufnr()", bufnr) < 0)
return FAIL;
if (wp->w_buffer->b_nwindows > 1)
{
char *hash_key = alloc(NUMBUFLEN);
vim_snprintf(hash_key, NUMBUFLEN, "%d", bufnr);
hash_add(terminal_bufs, (char_u *)hash_key);
}
return put_eol(fd);
}

View File

@@ -58,7 +58,7 @@ func Test_expand_sfile_and_stack()
END
call writefile(lines, 'Xstack')
source Xstack
call assert_match('\<Xstack\[2\]', g:stack_value)
call assert_match('\<Xstack\[2\]$', g:stack_value)
call delete('Xstack')
endfunc

View File

@@ -455,6 +455,32 @@ func Test_mksession_terminal_restore_other()
call delete('Xtest_mks.out')
endfunc
func Test_mksession_terminal_shared_windows()
terminal
let term_buf = bufnr()
new
execute "buffer" term_buf
mksession! Xtest_mks.out
let lines = readfile('Xtest_mks.out')
let found_creation = 0
let found_use = 0
for line in lines
if line =~ '^terminal'
let found_creation = 1
call assert_match('terminal ++curwin ++cols=\d\+ ++rows=\d\+', line)
elseif line =~ "^execute 'buffer ' . s:term_buf_" . term_buf . "$"
let found_use = 1
endif
endfor
call assert_true(found_creation && found_use)
call StopShellInTerminal(term_buf)
call delete('Xtest_mks.out')
endfunc
endif " has('terminal')
" Test :mkview with a file argument.

View File

@@ -112,6 +112,7 @@ foobar/?
set spelllang=
call assert_fails("call spellbadword('maxch')", 'E756:')
call assert_fails("spelldump", 'E756:')
call delete('Xwords.spl')
call delete('Xwords')

View File

@@ -307,6 +307,9 @@ func Test_spellfile_format_error()
" SN_SOFO: empty sofofrom and sofoto
call Spellfile_Test(0z06000000000400000000FF000000000000000000000000, '')
" SN_SOFO: multi-byte characters in sofofrom and sofoto
call Spellfile_Test(0z0600000000080002CF810002CF82FF000000000000000000000000, '')
" SN_COMPOUND: compmax is less than 2
call Spellfile_Test(0z08000000000101, 'E759:')
@@ -550,8 +553,14 @@ endfunc
" Test for the :mkspell command
func Test_mkspell()
call assert_fails('mkspell Xtest_us.spl', 'E751:')
call assert_fails('mkspell Xtest.spl abc', 'E484:')
call assert_fails('mkspell a b c d e f g h i j k', 'E754:')
" create a .aff file but not the .dic file
call writefile([], 'Xtest.aff')
call assert_fails('mkspell Xtest.spl Xtest', 'E484:')
call delete('Xtest.aff')
call writefile([], 'Xtest.spl')
call writefile([], 'Xtest.dic')
call assert_fails('mkspell Xtest.spl Xtest.dic', 'E13:')
@@ -772,6 +781,14 @@ func Test_aff_file_format_error()
call assert_fails('mkspell! Xtest.spl Xtest', 'E761:')
let &encoding = save_encoding
" missing UPP entry
call writefile(["FOL abc", "LOW abc"], 'Xtest.aff')
let save_encoding = &encoding
set encoding=cp949
let output = execute('mkspell! Xtest.spl Xtest')
call assert_match('Missing FOL/LOW/UPP line in Xtest.aff', output)
let &encoding = save_encoding
" duplicate word in the .dic file
call writefile(['2', 'good', 'good', 'good'], 'Xtest.dic')
call writefile(['NAME vim'], 'Xtest.aff')
@@ -779,6 +796,20 @@ func Test_aff_file_format_error()
call assert_match('First duplicate word in Xtest.dic line 3: good', output)
call assert_match('2 duplicate word(s) in Xtest.dic', output)
" use multiple .aff files with different values for COMPOUNDWORDMAX and
" MIDWORD (number and string)
call writefile(['1', 'world'], 'Xtest_US.dic')
call writefile(['1', 'world'], 'Xtest_CA.dic')
call writefile(["COMPOUNDWORDMAX 3", "MIDWORD '-"], 'Xtest_US.aff')
call writefile(["COMPOUNDWORDMAX 4", "MIDWORD '="], 'Xtest_CA.aff')
let output = execute('mkspell! Xtest.spl Xtest_US Xtest_CA')
call assert_match('COMPOUNDWORDMAX value differs from what is used in another .aff file', output)
call assert_match('MIDWORD value differs from what is used in another .aff file', output)
call delete('Xtest_US.dic')
call delete('Xtest_CA.dic')
call delete('Xtest_US.aff')
call delete('Xtest_CA.aff')
call delete('Xtest.dic')
call delete('Xtest.aff')
call delete('Xtest.spl')

File diff suppressed because it is too large Load Diff

View File

@@ -750,6 +750,24 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1663,
/**/
1662,
/**/
1661,
/**/
1660,
/**/
1659,
/**/
1658,
/**/
1657,
/**/
1656,
/**/
1655,
/**/
1654,
/**/

View File

@@ -4320,6 +4320,12 @@ compile_nested_function(exarg_T *eap, cctx_T *cctx)
ufunc_T *ufunc;
int r;
if (*name_start == '!')
{
emsg(_(e_cannot_use_bang_with_nested_def));
return NULL;
}
// Only g:Func() can use a namespace.
if (name_start[1] == ':' && !is_global)
{

View File

@@ -1665,6 +1665,7 @@ call_def_function(
// call a :def function
case ISN_DCALL:
SOURCING_LNUM = iptr->isn_lnum;
if (call_dfunc(iptr->isn_arg.dfunc.cdf_idx,
iptr->isn_arg.dfunc.cdf_argcount,
&ectx) == FAIL)