Skip to content

Commit 6acaecf

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 4204e69 + 9be736f commit 6acaecf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+951
-398
lines changed

.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ macos_task:
3636
timeout_in: 20m
3737
install_script:
3838
- brew update
39-
- brew install gettext libtool
39+
- brew install gettext libtool diffutils
4040
build_script:
4141
- NPROC=$(getconf _NPROCESSORS_ONLN)
4242
- ./configure --with-features=${FEATURES}

.github/workflows/coverity.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ permissions:
99

1010
jobs:
1111
scan:
12-
runs-on: ubuntu-20.04
12+
runs-on: ubuntu-22.04
1313

1414
env:
1515
CC: gcc
@@ -32,15 +32,15 @@ jobs:
3232
- name: Install packages
3333
if: env.TOKEN
3434
run: |
35-
sudo apt update && sudo apt install -y \
35+
sudo apt-get update && sudo apt-get install -y \
3636
autoconf \
3737
gettext \
3838
libcanberra-dev \
3939
libperl-dev \
40-
python-dev \
40+
python2-dev \
4141
python3-dev \
42-
liblua5.3-dev \
43-
lua5.3 \
42+
liblua5.4-dev \
43+
lua5.4 \
4444
ruby-dev \
4545
tcl-dev \
4646
libgtk2.0-dev \

ci/build-snd-dummy.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

runtime/autoload/dist/ft.vim

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -307,14 +307,16 @@ export def FTfs()
307307
if exists("g:filetype_fs")
308308
exe "setf " .. g:filetype_fs
309309
else
310-
var line = getline(nextnonblank(1))
311-
# comments and colon definitions
312-
if line =~ '^\s*\.\=( ' || line =~ '^\s*\\G\= ' || line =~ '^\\$'
313-
\ || line =~ '^\s*: \S'
314-
setf forth
315-
else
316-
setf fsharp
317-
endif
310+
var n = 1
311+
while n < 100 && n <= line("$")
312+
# Forth comments and colon definitions
313+
if getline(n) =~ "^[:(\\\\] "
314+
setf forth
315+
return
316+
endif
317+
n += 1
318+
endwhile
319+
setf fsharp
318320
endif
319321
enddef
320322

runtime/autoload/dist/script.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,9 @@ def DetectFromText(line1: string)
338338
set ft=virata
339339

340340
# Strace
341-
elseif line1 =~ '[0-9:.]* *execve(' || line1 =~ '^__libc_start_main'
341+
# inaccurate fast match first, then use accurate slow match
342+
elseif (line1 =~ 'execve(' && line1 =~ '^[0-9:.]* *execve(')
343+
|| line1 =~ '^__libc_start_main'
342344
set ft=strace
343345

344346
# VSE JCL

runtime/filetype.vim

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,10 @@ if has("fname_case")
338338
au BufNewFile,BufRead *.C,*.H setf cpp
339339
endif
340340

341+
" C++ 20 modules (clang)
342+
" https://clang.llvm.org/docs/StandardCPlusPlusModules.html#file-name-requirement
343+
au BufNewFile,BufRead *.cppm,*.ccm,*.cxxm,*.c++m setf cpp
344+
341345
" .h files can be C, Ch C++, ObjC or ObjC++.
342346
" Set c_syntax_for_h if you want C, ch_syntax_for_h if you want Ch. ObjC is
343347
" detected automatically.
@@ -841,7 +845,7 @@ au BufNewFile,BufRead *.graphql,*.graphqls,*.gql setf graphql
841845
au BufNewFile,BufRead *.gretl setf gretl
842846

843847
" Groovy
844-
au BufNewFile,BufRead *.gradle,*.groovy setf groovy
848+
au BufNewFile,BufRead *.gradle,*.groovy,Jenkinsfile setf groovy
845849

846850
" GNU Server Pages
847851
au BufNewFile,BufRead *.gsp setf gsp
@@ -1162,6 +1166,9 @@ au BufNewFile,BufRead *.lite,*.lt setf lite
11621166
" LiteStep RC files
11631167
au BufNewFile,BufRead */LiteStep/*/*.rc setf litestep
11641168

1169+
" Livebook
1170+
au BufNewFile,BufRead *.livemd setf livebook
1171+
11651172
" Login access
11661173
au BufNewFile,BufRead */etc/login.access setf loginaccess
11671174

src/arglist.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,13 +1240,19 @@ do_arg_all(
12401240
need_mouse_correct = TRUE;
12411241
#endif
12421242

1243+
tabpage_T *new_lu_tp = curtab;
1244+
12431245
// Try closing all windows that are not in the argument list.
12441246
// Also close windows that are not full width;
12451247
// When 'hidden' or "forceit" set the buffer becomes hidden.
12461248
// Windows that have a changed buffer and can't be hidden won't be closed.
12471249
// When the ":tab" modifier was used do this for all tab pages.
12481250
arg_all_close_unused_windows(&aall);
12491251

1252+
// Now set the last used tabpage to where we started.
1253+
if (valid_tabpage(new_lu_tp))
1254+
lastused_tabpage = new_lu_tp;
1255+
12501256
// Open a window for files in the argument list that don't have one.
12511257
// ARGCOUNT may change while doing this, because of autocommands.
12521258
if (count > aall.opened_len || count <= 0)

src/auto/configure

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5688,10 +5688,15 @@ $as_echo "no" >&6; }
56885688
LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit-$vi_cv_version_lua"
56895689
fi
56905690
else
5691+
if test -d "${vi_cv_path_lua_pfx}/lib/lua$vi_cv_version_lua"; then
5692+
LUALIBDIR="lib/lua$vi_cv_version_lua"
5693+
else
5694+
LUALIBDIR=lib
5695+
fi
56915696
if test "X$LUA_INC" != "X"; then
5692-
LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua$vi_cv_version_lua"
5697+
LUA_LIBS="-L${vi_cv_path_lua_pfx}/${LUALIBDIR} -llua$vi_cv_version_lua"
56935698
else
5694-
LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua"
5699+
LUA_LIBS="-L${vi_cv_path_lua_pfx}/${LUALIBDIR} -llua"
56955700
fi
56965701
fi
56975702
if test "$enable_luainterp" = "dynamic"; then
@@ -7007,6 +7012,7 @@ __:
70077012
@echo "python3_SYSLIBS='$(SYSLIBS)'"
70087013
@echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
70097014
@echo "python3_INSTSONAME='$(INSTSONAME)'"
7015+
@echo "python3_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
70107016
eof
70117017
eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
70127018
rm -f -- "${tmp_mkf}"
@@ -7025,6 +7031,8 @@ else
70257031

70267032
if test "X$python3_DLLLIBRARY" != "X"; then
70277033
vi_cv_dll_name_python3="$python3_DLLLIBRARY"
7034+
elif test "X$python3_PYTHONFRAMEWORKPREFIX" != "X"; then
7035+
vi_cv_dll_name_python3="${python3_PYTHONFRAMEWORKPREFIX}/${python3_INSTSONAME}"
70287036
else
70297037
vi_cv_dll_name_python3="$python3_INSTSONAME"
70307038
fi
@@ -10482,9 +10490,9 @@ $as_echo "no" >&6; }
1048210490

1048310491
GUI_LIB_LOC="`echo $GUI_LIB_LOC|sed 's%-L%%g'`"
1048410492

10485-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI libs" >&5
10493+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI libs" >&5
1048610494
$as_echo_n "checking for location of Motif GUI libs... " >&6; }
10487-
gui_libs="`echo $x_libraries|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/lib/g` /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu `echo "$GUI_INC_LOC" | sed s/include/lib/` $GUI_LIB_LOC"
10495+
gui_libs="`echo $x_libraries|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/lib/g` /usr/lib64 /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu `echo "$GUI_INC_LOC" | sed s/include/lib/` $GUI_LIB_LOC"
1048810496
GUI_LIB_LOC=
1048910497
for try in $gui_libs; do
1049010498
for libtry in "$try"/libXm.a "$try"/libXm.dll.a "$try"/libXm.so* "$try"/libXm.sl "$try"/libXm.dylib; do
@@ -10494,7 +10502,8 @@ $as_echo_n "checking for location of Motif GUI libs... " >&6; }
1049410502
done
1049510503
done
1049610504
if test -n "$GUI_LIB_LOC"; then
10497-
if test "$GUI_LIB_LOC" = /usr/lib \
10505+
if test "$GUI_LIB_LOC" = /usr/lib \
10506+
-o "$GUI_LIB_LOC" = /usr/lib64 \
1049810507
-o "$GUI_LIB_LOC" = /usr/lib/i386-linux-gnu \
1049910508
-o "$GUI_LIB_LOC" = /usr/lib/x86_64-linux-gnu; then
1050010509
GUI_LIB_LOC=
@@ -12793,7 +12802,8 @@ for ac_func in fchdir fchown fchmod fsync getcwd getpseudotty \
1279312802
getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
1279412803
sigprocmask sigvec strcasecmp strcoll strerror strftime stricmp strncasecmp \
1279512804
strnicmp strpbrk strptime strtol tgetent towlower towupper iswupper \
12796-
tzset usleep utime utimes mblen ftruncate unsetenv posix_openpt
12805+
tzset usleep utime utimes mblen ftruncate unsetenv posix_openpt \
12806+
clock_gettime
1279712807
do :
1279812808
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
1279912809
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"

src/autocmd.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1567,6 +1567,8 @@ aucmd_prepbuf(
15671567
aco->save_curwin_id = curwin->w_id;
15681568
aco->save_curbuf = curbuf;
15691569
aco->save_prevwin_id = prevwin == NULL ? 0 : prevwin->w_id;
1570+
aco->save_State = State;
1571+
15701572
if (win != NULL)
15711573
{
15721574
// There is a window for "buf" in the current tab page, make it the
@@ -1658,7 +1660,13 @@ aucmd_restbuf(
16581660
}
16591661
}
16601662
win_found:
1661-
1663+
#ifdef FEAT_JOB_CHANNEL
1664+
// May need to stop Insert mode if we were in a prompt buffer.
1665+
leaving_window(curwin);
1666+
// Do not stop Insert mode when already in Insert mode before.
1667+
if (aco->save_State & MODE_INSERT)
1668+
stop_insert_mode = FALSE;
1669+
#endif
16621670
// Remove the window and frame from the tree of frames.
16631671
(void)winframe_remove(curwin, &dummy, NULL);
16641672
win_remove(curwin, NULL);
@@ -2013,7 +2021,7 @@ apply_autocmds_group(
20132021
save_redo_T save_redo;
20142022
int save_KeyTyped = KeyTyped;
20152023
int save_did_emsg;
2016-
ESTACK_CHECK_DECLARATION
2024+
ESTACK_CHECK_DECLARATION;
20172025

20182026
/*
20192027
* Quickly return if there are no autocommands for this event or
@@ -2219,7 +2227,7 @@ apply_autocmds_group(
22192227

22202228
// name and lnum are filled in later
22212229
estack_push(ETYPE_AUCMD, NULL, 0);
2222-
ESTACK_CHECK_SETUP
2230+
ESTACK_CHECK_SETUP;
22232231

22242232
save_current_sctx = current_sctx;
22252233

@@ -2332,7 +2340,7 @@ apply_autocmds_group(
23322340
filechangeshell_busy = FALSE;
23332341
autocmd_nested = save_autocmd_nested;
23342342
vim_free(SOURCING_NAME);
2335-
ESTACK_CHECK_NOW
2343+
ESTACK_CHECK_NOW;
23362344
estack_pop();
23372345
vim_free(autocmd_fname);
23382346
autocmd_fname = save_autocmd_fname;

src/blob.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ blob_filter_map(
629629
if (b->bv_lock == 0)
630630
b->bv_lock = VAR_LOCKED;
631631

632-
// Create one funccal_T for all eval_expr_typval() calls.
632+
// Create one funccall_T for all eval_expr_typval() calls.
633633
fc = eval_expr_get_funccal(expr, &newtv);
634634

635635
for (i = 0; i < b->bv_ga.ga_len; i++)

0 commit comments

Comments
 (0)