Skip to content

Commit 801217e

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents d3ced67 + c572ad5 commit 801217e

32 files changed

+410
-249
lines changed

runtime/filetype.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -978,6 +978,9 @@ au BufNewFile,BufRead .babelrc,.eslintrc,.prettierrc,.firebaserc setf json
978978
" JSONC
979979
au BufNewFile,BufRead *.jsonc setf jsonc
980980

981+
" Jsonnet
982+
au BufNewFile,BufRead *.jsonnet,*.libjsonnet setf jsonnet
983+
981984
" Julia
982985
au BufNewFile,BufRead *.jl setf julia
983986

src/clientserver.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,7 @@ cmdsrv_main(
425425
if (argtype == ARGTYPE_EDIT_WAIT)
426426
{
427427
int numFiles = *argc - i - 1;
428-
int j;
429428
char_u *done = alloc(numFiles);
430-
char_u *p;
431429
# ifdef FEAT_GUI_MSWIN
432430
NOTIFYICONDATA ni;
433431
int count = 0;
@@ -452,6 +450,8 @@ cmdsrv_main(
452450
vim_memset(done, 0, numFiles);
453451
while (memchr(done, 0, numFiles) != NULL)
454452
{
453+
char_u *p;
454+
int j;
455455
# ifdef MSWIN
456456
p = serverGetReply(srv, NULL, TRUE, TRUE, 0);
457457
if (p == NULL)
@@ -464,6 +464,7 @@ cmdsrv_main(
464464
break;
465465
# endif
466466
j = atoi((char *)p);
467+
vim_free(p);
467468
if (j >= 0 && j < numFiles)
468469
{
469470
# ifdef FEAT_GUI_MSWIN

src/evalbuffer.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,11 @@ set_buffer_lines(
254254
&& wp->w_cursor.lnum > append_lnum)
255255
wp->w_cursor.lnum += added;
256256
check_cursor_col();
257-
update_topline();
257+
258+
// Only update the window view if w_buffer matches curbuf, otherwise
259+
// the computations will be wrong.
260+
if (curwin->w_buffer == curbuf)
261+
update_topline();
258262
}
259263

260264
done:

src/proto/vim9instr.pro

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,14 @@ int generate_JUMP(cctx_T *cctx, jumpwhen_T when, int where);
4646
int generate_JUMP_IF_ARG_SET(cctx_T *cctx, int arg_off);
4747
int generate_FOR(cctx_T *cctx, int loop_idx);
4848
int generate_TRYCONT(cctx_T *cctx, int levels, int where);
49+
int check_internal_func_args(cctx_T *cctx, int func_idx, int argcount, int method_call, type2_T **argtypes, type2_T *shuffled_argtypes);
4950
int generate_BCALL(cctx_T *cctx, int func_idx, int argcount, int method_call);
5051
int generate_LISTAPPEND(cctx_T *cctx);
5152
int generate_BLOBAPPEND(cctx_T *cctx);
53+
int check_args_on_stack(cctx_T *cctx, ufunc_T *ufunc, int argcount);
5254
int generate_CALL(cctx_T *cctx, ufunc_T *ufunc, int pushed_argcount);
5355
int generate_UCALL(cctx_T *cctx, char_u *name, int argcount);
56+
int check_func_args_from_type(cctx_T *cctx, type_T *type, int argcount, int at_top, char_u *name);
5457
int generate_PCALL(cctx_T *cctx, int argcount, char_u *name, type_T *type, int at_top);
5558
int generate_DEFER(cctx_T *cctx, int var_idx, int argcount);
5659
int generate_STRINGMEMBER(cctx_T *cctx, char_u *name, size_t len);

src/regexp_bt.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3441,11 +3441,13 @@ regmatch(
34413441
case RE_VCOL:
34423442
{
34433443
win_T *wp = rex.reg_win == NULL ? curwin : rex.reg_win;
3444-
linenr_T lnum = rex.reg_firstlnum + rex.lnum;
3445-
long_u vcol = 0;
3444+
linenr_T lnum = REG_MULTI ? rex.reg_firstlnum + rex.lnum : 1;
3445+
long_u vcol;
34463446

3447-
if (lnum >= 0 && lnum <= wp->w_buffer->b_ml.ml_line_count)
3448-
vcol = (long_u)win_linetabsize(wp, lnum, rex.line,
3447+
if (REG_MULTI && (lnum <= 0
3448+
|| lnum > wp->w_buffer->b_ml.ml_line_count))
3449+
lnum = 1;
3450+
vcol = (long_u)win_linetabsize(wp, lnum, rex.line,
34493451
(colnr_T)(rex.input - rex.line));
34503452
if (!re_num_cmp(vcol + 1, scan))
34513453
status = RA_NOMATCH;

src/regexp_nfa.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6775,12 +6775,14 @@ nfa_regmatch(
67756775
}
67766776
if (!result)
67776777
{
6778-
linenr_T lnum = rex.reg_firstlnum + rex.lnum;
6779-
long_u vcol = 0;
6780-
6781-
if (lnum >= 0
6782-
&& lnum <= wp->w_buffer->b_ml.ml_line_count)
6783-
vcol = (long_u)win_linetabsize(wp, lnum,
6778+
linenr_T lnum = REG_MULTI
6779+
? rex.reg_firstlnum + rex.lnum : 1;
6780+
long_u vcol;
6781+
6782+
if (REG_MULTI && (lnum <= 0
6783+
|| lnum > wp->w_buffer->b_ml.ml_line_count))
6784+
lnum = 1;
6785+
vcol = (long_u)win_linetabsize(wp, lnum,
67846786
rex.line, col);
67856787
result = nfa_re_num_cmp(t->state->val, op, vcol + 1);
67866788
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
|1+0&#ffffff0| @73
2+
|2| @73
3+
|3| @73
4+
|4| @73
5+
>5| @35|0+0#0000001#ffd7ff255| +0#0000000#ffffff0@36
6+
|~+0#4040ff13&| @35|1+0#0000001#ffd7ff255| +0#4040ff13#ffffff0@36
7+
|!+2#ffffff16#00e0003|s|e|q| |1| |5| |[|f|i|n|i|s|h|e|d|]| @17|2+0#0000001#ffd7ff255| +2#ffffff16#00e0003@18|5|,|1| @11|A|l@1
8+
| +0#0000000#ffffff0@36|3+0#0000001#ffd7ff255| +0#0000000#ffffff0@36
9+
|~+0#4040ff13&| @35|4+0#0000001#ffd7ff255| +0#4040ff13#ffffff0@36
10+
|~| @35| +0#0000001#ffd7ff255| +0#4040ff13#ffffff0@36
11+
|~| @73
12+
|~| @73
13+
|~| @73
14+
|[+1#0000000&|N|o| |N|a|m|e|]| @47|0|,|0|-|1| @9|A|l@1
15+
| +0&&@74

src/testdir/test_autocmd.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,7 @@ func Test_autocmd_bufwipe_in_SessLoadPost()
763763

764764
call writefile(content, 'Xvimrc', 'D')
765765
call system(GetVimCommand('Xvimrc') .. ' --not-a-term --noplugins -S Session.vim -c cq')
766+
sleep 50m
766767
let errors = join(readfile('Xerrors'))
767768
call assert_match('E814:', errors)
768769

src/testdir/test_buffer.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ endfunc
375375
func Test_buffer_scheme()
376376
CheckMSWindows
377377

378+
set noswapfile
378379
set noshellslash
379380
%bwipe!
380381
let bufnames = [
@@ -397,6 +398,7 @@ func Test_buffer_scheme()
397398
endfor
398399

399400
set shellslash&
401+
set swapfile&
400402
endfunc
401403

402404
" this was using a NULL pointer after failing to use the pattern

src/testdir/test_bufline.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ func Test_setline_startup()
8383
endif
8484
call writefile(['call setline(1, "Hello")', 'silent w Xtest', 'q!'], 'Xscript', 'D')
8585
call system(cmd)
86+
sleep 50m
8687
call assert_equal(['Hello'], readfile('Xtest'))
8788

8889
call delete('Xtest')

0 commit comments

Comments
 (0)