Skip to content

Commit 6b073a5

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 820f30d + a906e8e commit 6b073a5

51 files changed

Lines changed: 355 additions & 124 deletions

Some content is hidden

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

runtime/autoload/dist/ft.vim

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,23 @@ export def FTsig()
878878
endif
879879
enddef
880880

881+
# This function checks the first 100 lines of files matching "*.sil" to
882+
# resolve detection between Swift Intermediate Language and SILE.
883+
export def FTsil()
884+
for lnum in range(1, [line('$'), 100]->min())
885+
var line: string = getline(lnum)
886+
if line =~ '^\s*[\\%]'
887+
setf sile
888+
return
889+
elseif line =~ '^\s*\S'
890+
setf sil
891+
return
892+
endif
893+
endfor
894+
# no clue, default to "sil"
895+
setf sil
896+
enddef
897+
881898
export def FTsys()
882899
if exists("g:filetype_sys")
883900
exe "setf " .. g:filetype_sys

runtime/doc/map.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1724,11 +1724,11 @@ The valid escape sequences are
17241724
*<mods>* *<q-mods>* *:command-modifiers*
17251725
<mods> The command modifiers, if specified. Otherwise, expands to
17261726
nothing. Supported modifiers are |:aboveleft|, |:belowright|,
1727-
|:botright|, |:browse|, |:confirm|, |:hide|, |:keepalt|,
1728-
|:keepjumps|, |:keepmarks|, |:keeppatterns|, |:leftabove|,
1729-
|:lockmarks|, |:noautocmd|, |:noswapfile| |:rightbelow|,
1730-
|:sandbox|, |:silent|, |:tab|, |:topleft|, |:unsilent|,
1731-
|:verbose|, and |:vertical|.
1727+
|:botright|, |:browse|, |:confirm|, |:hide|, |:horizontal|,
1728+
|:keepalt|, |:keepjumps|, |:keepmarks|, |:keeppatterns|,
1729+
|:leftabove|, |:lockmarks|, |:noautocmd|, |:noswapfile|
1730+
|:rightbelow|, |:sandbox|, |:silent|, |:tab|, |:topleft|,
1731+
|:unsilent|, |:verbose|, and |:vertical|.
17321732
Note that |:filter| is not supported.
17331733
Examples: >
17341734
command! -nargs=+ -complete=file MyEdit

runtime/doc/term.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,18 @@ Example for an xterm, this changes the color of the cursor: >
643643
endif
644644
NOTE: When Vim exits the shape for Normal mode will remain. The shape from
645645
before Vim started will not be restored.
646+
647+
For Windows Terminal you can use something like this: >
648+
" Note: This should be set after `set termguicolors` or `set t_Co=256`.
649+
if &term =~ 'xterm' || &term == 'win32'
650+
" Use DECSCUSR escape sequences
651+
let &t_SI = "\e[5 q" " blink bar
652+
let &t_SR = "\e[3 q" " blink underline
653+
let &t_EI = "\e[1 q" " blink block
654+
let &t_ti ..= "\e[1 q" " blink block
655+
let &t_te ..= "\e[0 q" " default (depends on terminal, normally blink block)
656+
endif
657+
646658
{not available when compiled without the |+cursorshape| feature}
647659

648660
*termcap-title*

runtime/doc/vim9.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1618,7 +1618,7 @@ type, it can not be used in Vim9 script.
16181618
*E1211* *E1217* *E1218* *E1219* *E1220* *E1221*
16191619
*E1222* *E1223* *E1224* *E1225* *E1226* *E1227*
16201620
*E1228* *E1238* *E1250* *E1251* *E1252* *E1253*
1621-
*E1256* *E1297*
1621+
*E1256* *E1297* *E1298*
16221622
Types are checked for most builtin functions to make it easier to spot
16231623
mistakes.
16241624

runtime/filetype.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1822,7 +1822,7 @@ au BufNewFile,BufRead *.score setf slrnsc
18221822
au BufNewFile,BufRead *.st setf st
18231823

18241824
" Smalltalk (and Rexx, TeX, and Visual Basic)
1825-
au BufNewFile,BufRead *.cls call dist#ft#FTcls()
1825+
au BufNewFile,BufRead *.cls call dist#ft#FTcls()
18261826

18271827
" Smarty templates
18281828
au BufNewFile,BufRead *.tpl setf smarty
@@ -1929,8 +1929,8 @@ au BufNewFile,BufRead *.cm setf voscm
19291929
au BufNewFile,BufRead *.swift setf swift
19301930
au BufNewFile,BufRead *.swift.gyb setf swiftgyb
19311931

1932-
" Swift Intermediate Language
1933-
au BufNewFile,BufRead *.sil setf sil
1932+
" Swift Intermediate Language or SILE
1933+
au BufNewFile,BufRead *.sil call dist#ft#FTsil()
19341934

19351935
" Sysctl
19361936
au BufNewFile,BufRead */etc/sysctl.conf,*/etc/sysctl.d/*.conf setf sysctl

src/channel.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2757,12 +2757,8 @@ channel_exe_cmd(channel_T *channel, ch_part_T part, typval_T *argv)
27572757
}
27582758
else if (STRCMP(cmd, "redraw") == 0)
27592759
{
2760-
exarg_T ea;
2761-
27622760
ch_log(channel, "redraw");
2763-
CLEAR_FIELD(ea);
2764-
ea.forceit = *arg != NUL;
2765-
ex_redraw(&ea);
2761+
redraw_cmd(*arg != NUL);
27662762
showruler(FALSE);
27672763
setcursor();
27682764
out_flush_cursor(TRUE, FALSE);

src/cmdexpand.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1776,6 +1776,7 @@ set_context_by_cmdname(
17761776
case CMD_folddoclosed:
17771777
case CMD_folddoopen:
17781778
case CMD_hide:
1779+
case CMD_horizontal:
17791780
case CMD_keepalt:
17801781
case CMD_keepjumps:
17811782
case CMD_keepmarks:

src/errors.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3323,5 +3323,9 @@ EXTERN char e_cannot_specify_both_type_and_types[]
33233323
EXTERN char e_can_only_use_left_padding_when_column_is_zero[]
33243324
INIT(= N_("E1296: Can only use left padding when column is zero"));
33253325
#endif
3326+
#ifdef FEAT_EVAL
33263327
EXTERN char e_non_null_dict_required_for_argument_nr[]
33273328
INIT(= N_("E1297: Non-NULL Dictionary required for argument %d"));
3329+
EXTERN char e_non_null_list_required_for_argument_nr[]
3330+
INIT(= N_("E1298: Non-NULL List required for argument %d"));
3331+
#endif

src/eval.c

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6729,7 +6729,8 @@ ex_execute(exarg_T *eap)
67296729

67306730
ga_init2(&ga, 1, 80);
67316731
#ifdef HAS_MESSAGE_WINDOW
6732-
in_echowindow = (eap->cmdidx == CMD_echowindow);
6732+
if (eap->cmdidx == CMD_echowindow)
6733+
start_echowindow();
67336734
#endif
67346735

67356736
if (eap->skip)
@@ -6833,17 +6834,7 @@ ex_execute(exarg_T *eap)
68336834
--emsg_skip;
68346835
#ifdef HAS_MESSAGE_WINDOW
68356836
if (eap->cmdidx == CMD_echowindow)
6836-
{
6837-
// show the message window now
6838-
ex_redraw(eap);
6839-
6840-
// do not overwrite messages
6841-
// TODO: only for message window
6842-
msg_didout = TRUE;
6843-
if (msg_col == 0)
6844-
msg_col = 1;
6845-
in_echowindow = FALSE;
6846-
}
6837+
end_echowindow();
68476838
#endif
68486839
set_nextcmd(eap, arg);
68496840
}

src/evalfunc.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3235,11 +3235,8 @@ f_call(typval_T *argvars, typval_T *rettv)
32353235
|| check_for_opt_dict_arg(argvars, 2) == FAIL))
32363236
return;
32373237

3238-
if (argvars[1].v_type != VAR_LIST)
3239-
{
3240-
emsg(_(e_list_required));
3238+
if (check_for_list_arg(argvars, 1) == FAIL)
32413239
return;
3242-
}
32433240
if (argvars[1].vval.v_list == NULL)
32443241
return;
32453242

0 commit comments

Comments
 (0)