Skip to content

Commit 325e09d

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 5933cc8 + 2a99fe6 commit 325e09d

166 files changed

Lines changed: 5383 additions & 4139 deletions

File tree

Some content is hidden

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

runtime/doc/builtin.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3530,6 +3530,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
35303530
messages |:messages| suboptions
35313531
option options
35323532
packadd optional package |pack-add| names
3533+
runtime |:runtime| completion
35333534
scriptnames sourced script names |:scriptnames|
35343535
shellcmd Shell command
35353536
sign |:sign| suboptions
@@ -7968,7 +7969,7 @@ setcellwidths({list}) *setcellwidths()*
79687969
{low} and {high} can be the same, in which case this refers to
79697970
one character. Otherwise it is the range of characters from
79707971
{low} to {high} (inclusive). *E1111* *E1114*
7971-
Only characters with value 0x100 and higher can be used.
7972+
Only characters with value 0x80 and higher can be used.
79727973

79737974
{width} must be either 1 or 2, indicating the character width
79747975
in screen cells. *E1112*

runtime/filetype.vim

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,9 @@ au BufNewFile,BufRead *.lpc,*.ulpc setf lpc
277277
" Calendar
278278
au BufNewFile,BufRead calendar setf calendar
279279

280+
" Cap'n Proto
281+
au BufNewFile,BufRead *.capnp setf capnp
282+
280283
" C#
281284
au BufNewFile,BufRead *.cs,*.csx setf cs
282285

@@ -626,6 +629,9 @@ au BufNewFile,BufRead *.elm setf elm
626629
" Elm Filter Rules file
627630
au BufNewFile,BufRead filter-rules setf elmfilt
628631

632+
" Elsa - https://github.com/ucsd-progsys/elsa
633+
au BufNewFile,BufRead *.lc setf elsa
634+
629635
" ESMTP rc file
630636
au BufNewFile,BufRead *esmtprc setf esmtprc
631637

@@ -1396,6 +1402,7 @@ au BufNewFile,BufRead pf.conf setf pf
13961402
" ini style config files, using # comments
13971403
au BufNewFile,BufRead */etc/pacman.conf,mpv.conf setf confini
13981404
au BufNewFile,BufRead */.aws/config,*/.aws/credentials setf confini
1405+
au BufNewFile,BufRead *.nmconnection setf confini
13991406

14001407
" Pacman hooks
14011408
au BufNewFile,BufRead *.hook
@@ -2103,6 +2110,9 @@ au BufNewFile,BufRead *.texinfo,*.texi,*.txi setf texinfo
21032110
" TeX configuration
21042111
au BufNewFile,BufRead texmf.cnf setf texmf
21052112

2113+
" Thrift (Apache)
2114+
au BufNewFile,BufRead *.thrift setf thrift
2115+
21062116
" Tidy config
21072117
au BufNewFile,BufRead .tidyrc,tidyrc,tidy.conf setf tidy
21082118

src/auto/configure

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16575,8 +16575,8 @@ printf "%s\n" "no" >&6; }
1657516575
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_FORTIFY_SOURCE=1" >&5
1657616576
printf %s "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
1657716577
if test "$gccmajor" -gt "3"; then
16578-
CFLAGS=`echo "$CFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE//g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
16579-
CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE//g' -e 's/ *-U_FORTIFY_SOURCE//g'`
16578+
CFLAGS=`echo "$CFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE/ /g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
16579+
CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE/ /g' -e 's/ *-U_FORTIFY_SOURCE//g'`
1658016580
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1658116581
printf "%s\n" "yes" >&6; }
1658216582
else

src/blowfish.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,8 @@ bf_self_test(void)
517517

518518
// We can't simply use sizeof(UINT32_T), it would generate a compiler
519519
// warning.
520-
if (ui != 0xffffffffUL || ui + 1 != 0) {
520+
if (ui != 0xffffffffUL || ui + 1 != 0)
521+
{
521522
err++;
522523
emsg(_(e_sizeof_uint32_isnot_four));
523524
}
@@ -573,13 +574,15 @@ bf_cfb_init(
573574
}
574575
}
575576

576-
#define BF_CFB_UPDATE(bfs, c) { \
577+
#define BF_CFB_UPDATE(bfs, c) \
578+
{ \
577579
bfs->cfb_buffer[bfs->update_offset] ^= (char_u)c; \
578580
if (++bfs->update_offset == bfs->cfb_len) \
579581
bfs->update_offset = 0; \
580582
}
581583

582-
#define BF_RANBYTE(bfs, t) { \
584+
#define BF_RANBYTE(bfs, t) \
585+
{ \
583586
if ((bfs->randbyte_offset & BF_BLOCK_MASK) == 0) \
584587
bf_e_cblock(bfs, &(bfs->cfb_buffer[bfs->randbyte_offset])); \
585588
t = bfs->cfb_buffer[bfs->randbyte_offset]; \

src/cindent.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2641,7 +2641,7 @@ get_c_indent(void)
26412641

26422642
// It could have been something like
26432643
// case 1: if (asdf &&
2644-
// ldfd) {
2644+
// condition) {
26452645
// }
26462646
if ((curbuf->b_ind_js || curbuf->b_ind_keep_case_label)
26472647
&& cin_iscase(skipwhite(ml_get_curline()), FALSE))
@@ -3275,7 +3275,7 @@ get_c_indent(void)
32753275
}
32763276

32773277
// Check if we are after an "if", "while", etc.
3278-
// Also allow " } else".
3278+
// Also allow "} else".
32793279
if (cin_is_cinword(l) || cin_iselse(skipwhite(l)))
32803280
{
32813281
// Found an unterminated line after an if (), line up
@@ -3335,7 +3335,7 @@ get_c_indent(void)
33353335
{
33363336
// If we're looking at "} else", let's make sure we
33373337
// find the opening brace of the enclosing scope,
3338-
// not the one from "if () {".
3338+
// not the one from "if (condition) {".
33393339
if (*l == '}')
33403340
curwin->w_cursor.col =
33413341
(colnr_T)(l - ml_get_curline()) + 1;
@@ -3680,7 +3680,7 @@ get_c_indent(void)
36803680
// line needs to be indented as a function type spec.
36813681
// Don't do this if the current line looks like a comment or if the
36823682
// current line is terminated, ie. ends in ';', or if the current line
3683-
// contains { or }: "void f() {\n if (1)"
3683+
// contains { or }: "void f(condition) {\n if (1)"
36843684
if (cur_curpos.lnum < curbuf->b_ml.ml_line_count
36853685
&& !cin_nocode(theline)
36863686
&& vim_strchr(theline, '{') == NULL

src/cmdexpand.c

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ cmdline_fuzzy_completion_supported(expand_T *xp)
5656
&& xp->xp_context != EXPAND_OLD_SETTING
5757
&& xp->xp_context != EXPAND_OWNSYNTAX
5858
&& xp->xp_context != EXPAND_PACKADD
59+
&& xp->xp_context != EXPAND_RUNTIME
5960
&& xp->xp_context != EXPAND_SHELLCMD
6061
&& xp->xp_context != EXPAND_TAGS
6162
&& xp->xp_context != EXPAND_TAGS_LISTFILES
@@ -1366,6 +1367,7 @@ addstar(
13661367
|| context == EXPAND_OWNSYNTAX
13671368
|| context == EXPAND_FILETYPE
13681369
|| context == EXPAND_PACKADD
1370+
|| context == EXPAND_RUNTIME
13691371
|| ((context == EXPAND_TAGS_LISTFILES
13701372
|| context == EXPAND_TAGS)
13711373
&& fname[0] == '/'))
@@ -2335,6 +2337,10 @@ set_context_by_cmdname(
23352337
xp->xp_pattern = arg;
23362338
break;
23372339

2340+
case CMD_runtime:
2341+
set_context_in_runtime_cmd(xp, arg);
2342+
break;
2343+
23382344
#if defined(HAVE_LOCALE_H) || defined(X_LOCALE)
23392345
case CMD_language:
23402346
return set_context_in_lang_cmd(xp, arg);
@@ -3052,6 +3058,8 @@ ExpandFromContext(
30523058
#endif
30533059
if (xp->xp_context == EXPAND_PACKADD)
30543060
return ExpandPackAddDir(pat, numMatches, matches);
3061+
if (xp->xp_context == EXPAND_RUNTIME)
3062+
return expand_runtime_cmd(pat, numMatches, matches);
30553063

30563064
// When expanding a function name starting with s:, match the <SNR>nr_
30573065
// prefix.
@@ -3611,13 +3619,15 @@ ExpandUserList(
36113619
/*
36123620
* Expand "file" for all comma-separated directories in "path".
36133621
* Adds the matches to "ga". Caller must init "ga".
3622+
* If "dirs" is TRUE only expand directory names.
36143623
*/
36153624
void
36163625
globpath(
36173626
char_u *path,
36183627
char_u *file,
36193628
garray_T *ga,
3620-
int expand_options)
3629+
int expand_options,
3630+
int dirs)
36213631
{
36223632
expand_T xpc;
36233633
char_u *buf;
@@ -3630,7 +3640,7 @@ globpath(
36303640
return;
36313641

36323642
ExpandInit(&xpc);
3633-
xpc.xp_context = EXPAND_FILES;
3643+
xpc.xp_context = dirs ? EXPAND_DIRECTORIES : EXPAND_FILES;
36343644

36353645
// Loop over all entries in {path}.
36363646
while (*path != NUL)
@@ -4037,6 +4047,11 @@ f_getcompletion(typval_T *argvars, typval_T *rettv)
40374047
xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern);
40384048
}
40394049
# endif
4050+
if (xpc.xp_context == EXPAND_RUNTIME)
4051+
{
4052+
set_context_in_runtime_cmd(&xpc, xpc.xp_pattern);
4053+
xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern);
4054+
}
40404055
}
40414056

40424057
if (cmdline_fuzzy_completion_supported(&xpc))

src/configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4834,8 +4834,8 @@ if test "$GCC" = yes; then
48344834
dnl And undefine it first to avoid a warning.
48354835
AC_MSG_CHECKING(whether we need -D_FORTIFY_SOURCE=1)
48364836
if test "$gccmajor" -gt "3"; then
4837-
CFLAGS=`echo "$CFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE//g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
4838-
CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE//g' -e 's/ *-U_FORTIFY_SOURCE//g'`
4837+
CFLAGS=`echo "$CFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE/ /g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
4838+
CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE/ /g' -e 's/ *-U_FORTIFY_SOURCE//g'`
48394839
AC_MSG_RESULT(yes)
48404840
else
48414841
AC_MSG_RESULT(no)

src/crypt_zip.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ make_crc_tab(void)
6060
/*
6161
* Return the next byte in the pseudo-random sequence.
6262
*/
63-
#define DECRYPT_BYTE_ZIP(keys, t) { \
63+
#define DECRYPT_BYTE_ZIP(keys, t) \
64+
{ \
6465
short_u temp = (short_u)keys[2] | 2; \
6566
t = (int)(((unsigned)(temp * (temp ^ 1U)) >> 8) & 0xff); \
6667
}

src/diff.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1680,9 +1680,8 @@ diff_read(
16801680
{
16811681
if (dio->dio_internal)
16821682
{
1683-
if (line_idx >= dout->dout_ga.ga_len) {
1683+
if (line_idx >= dout->dout_ga.ga_len)
16841684
break; // did last line
1685-
}
16861685
hunk = ((diffhunk_T **)dout->dout_ga.ga_data)[line_idx++];
16871686
}
16881687
else

src/digraph.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1682,7 +1682,7 @@ registerdigraph(int char1, int char2, int n)
16821682
}
16831683

16841684
// Add a new digraph to the table.
1685-
if (ga_grow(&user_digraphs, 1) != OK)
1685+
if (ga_grow(&user_digraphs, 1) == FAIL)
16861686
return;
16871687

16881688
dp = (digr_T *)user_digraphs.ga_data + user_digraphs.ga_len;
@@ -2093,7 +2093,8 @@ f_digraph_get(typval_T *argvars, typval_T *rettv)
20932093

20942094
if (has_mbyte)
20952095
buf[(*mb_char2bytes)(code, buf)] = NUL;
2096-
else {
2096+
else
2097+
{
20972098
buf[0] = code;
20982099
buf[1] = NUL;
20992100
}

0 commit comments

Comments
 (0)