Skip to content

Commit d47b18e

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 824b7fa + 977d037 commit d47b18e

Some content is hidden

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

70 files changed

+968
-594
lines changed

Filelist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ SRC_ALL = \
110110
src/testdir/setup.vim \
111111
src/testdir/gui_init.vim \
112112
src/testdir/setup_gui.vim \
113+
src/testdir/gui_preinit.vim \
113114
src/testdir/test[0-9]*.ok \
114115
src/testdir/test[0-9]*a.ok \
115116
src/testdir/test_[a-z]*.ok \

src/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2116,6 +2116,7 @@ test_arglist \
21162116
test_cdo \
21172117
test_channel \
21182118
test_charsearch \
2119+
test_charsearch_utf8 \
21192120
test_changedtick \
21202121
test_cindent \
21212122
test_cmdline \

src/buffer.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ read_buffer(
111111
{
112112
/* Set or reset 'modified' before executing autocommands, so that
113113
* it can be changed there. */
114-
if (!readonlymode && !bufempty())
114+
if (!readonlymode && !BUFEMPTY())
115115
changed();
116116
else if (retval == OK)
117117
unchanged(curbuf, FALSE);
@@ -1963,7 +1963,7 @@ buflist_new(
19631963
&& curbuf != NULL
19641964
&& curbuf->b_ffname == NULL
19651965
&& curbuf->b_nwindows <= 1
1966-
&& (curbuf->b_ml.ml_mfp == NULL || bufempty()))
1966+
&& (curbuf->b_ml.ml_mfp == NULL || BUFEMPTY()))
19671967
{
19681968
buf = curbuf;
19691969
#ifdef FEAT_AUTOCMD
@@ -2338,7 +2338,7 @@ buflist_getfile(
23382338
/* If 'switchbuf' contains "split", "vsplit" or "newtab" and the
23392339
* current buffer isn't empty: open new tab or window */
23402340
if (wp == NULL && (swb_flags & (SWB_VSPLIT | SWB_SPLIT | SWB_NEWTAB))
2341-
&& !bufempty())
2341+
&& !BUFEMPTY())
23422342
{
23432343
if (swb_flags & SWB_NEWTAB)
23442344
tabpage_new();
@@ -5027,7 +5027,7 @@ do_arg_all(
50275027
#ifdef FEAT_WINDOWS
50285028
/* ":drop all" should re-use an empty window to avoid "--remote-tab"
50295029
* leaving an empty tab page when executed locally. */
5030-
if (keep_tabs && bufempty() && curbuf->b_nwindows == 1
5030+
if (keep_tabs && BUFEMPTY() && curbuf->b_nwindows == 1
50315031
&& curbuf->b_ffname == NULL && !curbuf->b_changed)
50325032
use_firstwin = TRUE;
50335033
#endif

src/charset.c

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ win_linetabsize(win_T *wp, char_u *line, colnr_T len)
870870
char_u *s;
871871

872872
for (s = line; *s != NUL && (len == MAXCOL || s < line + len);
873-
mb_ptr_adv(s))
873+
MB_PTR_ADV(s))
874874
col += win_lbr_chartabsize(wp, line, s, col, NULL);
875875
return (int)col;
876876
}
@@ -1026,7 +1026,7 @@ lbr_chartabsize_adv(
10261026
int retval;
10271027

10281028
retval = lbr_chartabsize(line, *s, col);
1029-
mb_ptr_adv(*s);
1029+
MB_PTR_ADV(*s);
10301030
return retval;
10311031
}
10321032

@@ -1089,8 +1089,8 @@ win_lbr_chartabsize(
10891089
* needs a break here
10901090
*/
10911091
if (wp->w_p_lbr
1092-
&& vim_isbreak(c)
1093-
&& !vim_isbreak(s[1])
1092+
&& VIM_ISBREAK(c)
1093+
&& !VIM_ISBREAK((int)s[1])
10941094
&& wp->w_p_wrap
10951095
# ifdef FEAT_WINDOWS
10961096
&& wp->w_width != 0
@@ -1115,12 +1115,12 @@ win_lbr_chartabsize(
11151115
for (;;)
11161116
{
11171117
ps = s;
1118-
mb_ptr_adv(s);
1118+
MB_PTR_ADV(s);
11191119
c = *s;
11201120
if (!(c != NUL
1121-
&& (vim_isbreak(c)
1122-
|| (!vim_isbreak(c)
1123-
&& (col2 == col || !vim_isbreak(*ps))))))
1121+
&& (VIM_ISBREAK(c)
1122+
|| (!VIM_ISBREAK(c)
1123+
&& (col2 == col || !VIM_ISBREAK((int)*ps))))))
11241124
break;
11251125

11261126
col2 += win_chartabsize(wp, s, col2);
@@ -1369,7 +1369,7 @@ getvcol(
13691369
break;
13701370

13711371
vcol += incr;
1372-
mb_ptr_adv(ptr);
1372+
MB_PTR_ADV(ptr);
13731373
}
13741374
}
13751375
else
@@ -1390,7 +1390,7 @@ getvcol(
13901390
break;
13911391

13921392
vcol += incr;
1393-
mb_ptr_adv(ptr);
1393+
MB_PTR_ADV(ptr);
13941394
}
13951395
}
13961396
if (start != NULL)
@@ -1403,7 +1403,8 @@ getvcol(
14031403
&& (State & NORMAL)
14041404
&& !wp->w_p_list
14051405
&& !virtual_active()
1406-
&& !(VIsual_active && (*p_sel == 'e' || ltoreq(*pos, VIsual)))
1406+
&& !(VIsual_active
1407+
&& (*p_sel == 'e' || LTOREQ_POS(*pos, VIsual)))
14071408
)
14081409
*cursor = vcol + incr - 1; /* cursor at end */
14091410
else
@@ -1496,7 +1497,7 @@ getvcols(
14961497
{
14971498
colnr_T from1, from2, to1, to2;
14981499

1499-
if (ltp(pos1, pos2))
1500+
if (LT_POSP(pos1, pos2))
15001501
{
15011502
getvvcol(wp, pos1, &from1, NULL, &to1);
15021503
getvvcol(wp, pos2, &from2, NULL, &to2);
@@ -1529,7 +1530,7 @@ skipwhite(char_u *q)
15291530
{
15301531
char_u *p = q;
15311532

1532-
while (vim_iswhite(*p)) /* skip to next non-white */
1533+
while (VIM_ISWHITE(*p)) /* skip to next non-white */
15331534
++p;
15341535
return p;
15351536
}

src/config.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,9 @@
446446
/* Define if fcntl()'s F_SETFD command knows about FD_CLOEXEC */
447447
#undef HAVE_FD_CLOEXEC
448448

449+
/* Define if /proc/self/exe can be read */
450+
#undef HAVE_PROC_SELF_EXE
451+
449452
/* Define if you want Cygwin to use the WIN32 clipboard, not compatible with X11*/
450453
#undef FEAT_CYGWIN_WIN32_CLIPBOARD
451454

src/diff.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1667,7 +1667,7 @@ diff_cmp(char_u *s1, char_u *s2)
16671667
p2 = s2;
16681668
while (*p1 != NUL && *p2 != NUL)
16691669
{
1670-
if (vim_iswhite(*p1) && vim_iswhite(*p2))
1670+
if (VIM_ISWHITE(*p1) && VIM_ISWHITE(*p2))
16711671
{
16721672
p1 = skipwhite(p1);
16731673
p2 = skipwhite(p2);
@@ -1994,8 +1994,8 @@ diff_find_change(
19941994
while (line_org[si_org] != NUL)
19951995
{
19961996
if ((diff_flags & DIFF_IWHITE)
1997-
&& vim_iswhite(line_org[si_org])
1998-
&& vim_iswhite(line_new[si_new]))
1997+
&& VIM_ISWHITE(line_org[si_org])
1998+
&& VIM_ISWHITE(line_new[si_new]))
19991999
{
20002000
si_org = (int)(skipwhite(line_org + si_org) - line_org);
20012001
si_new = (int)(skipwhite(line_new + si_new) - line_new);
@@ -2029,14 +2029,14 @@ diff_find_change(
20292029
&& ei_org >= 0 && ei_new >= 0)
20302030
{
20312031
if ((diff_flags & DIFF_IWHITE)
2032-
&& vim_iswhite(line_org[ei_org])
2033-
&& vim_iswhite(line_new[ei_new]))
2032+
&& VIM_ISWHITE(line_org[ei_org])
2033+
&& VIM_ISWHITE(line_new[ei_new]))
20342034
{
20352035
while (ei_org >= *startp
2036-
&& vim_iswhite(line_org[ei_org]))
2036+
&& VIM_ISWHITE(line_org[ei_org]))
20372037
--ei_org;
20382038
while (ei_new >= si_new
2039-
&& vim_iswhite(line_new[ei_new]))
2039+
&& VIM_ISWHITE(line_new[ei_new]))
20402040
--ei_new;
20412041
}
20422042
else
@@ -2202,7 +2202,7 @@ ex_diffgetput(exarg_T *eap)
22022202
{
22032203
/* Buffer number or pattern given. Ignore trailing white space. */
22042204
p = eap->arg + STRLEN(eap->arg);
2205-
while (p > eap->arg && vim_iswhite(p[-1]))
2205+
while (p > eap->arg && VIM_ISWHITE(p[-1]))
22062206
--p;
22072207
for (i = 0; vim_isdigit(eap->arg[i]) && eap->arg + i < p; ++i)
22082208
;
@@ -2333,7 +2333,7 @@ ex_diffgetput(exarg_T *eap)
23332333
end_skip = 0;
23342334
}
23352335

2336-
buf_empty = bufempty();
2336+
buf_empty = BUFEMPTY();
23372337
added = 0;
23382338
for (i = 0; i < count; ++i)
23392339
{

0 commit comments

Comments
 (0)