Skip to content

Commit febef53

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents c1a5024 + b5760a1 commit febef53

8 files changed

Lines changed: 55 additions & 28 deletions

File tree

src/diff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ diff_write(buf_T *buf, char_u *fname)
641641
*/
642642
void
643643
ex_diffupdate(
644-
exarg_T *eap UNUSED) /* can be NULL */
644+
exarg_T *eap) /* can be NULL */
645645
{
646646
buf_T *buf;
647647
int idx_orig;

src/eval.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9217,7 +9217,7 @@ f_argidx(typval_T *argvars UNUSED, typval_T *rettv)
92179217
* "arglistid()" function
92189218
*/
92199219
static void
9220-
f_arglistid(typval_T *argvars UNUSED, typval_T *rettv)
9220+
f_arglistid(typval_T *argvars, typval_T *rettv)
92219221
{
92229222
win_T *wp;
92239223

@@ -17809,7 +17809,7 @@ f_round(typval_T *argvars, typval_T *rettv)
1780917809
* "screenattr()" function
1781017810
*/
1781117811
static void
17812-
f_screenattr(typval_T *argvars UNUSED, typval_T *rettv)
17812+
f_screenattr(typval_T *argvars, typval_T *rettv)
1781317813
{
1781417814
int row;
1781517815
int col;
@@ -17829,7 +17829,7 @@ f_screenattr(typval_T *argvars UNUSED, typval_T *rettv)
1782917829
* "screenchar()" function
1783017830
*/
1783117831
static void
17832-
f_screenchar(typval_T *argvars UNUSED, typval_T *rettv)
17832+
f_screenchar(typval_T *argvars, typval_T *rettv)
1783317833
{
1783417834
int row;
1783517835
int col;
@@ -20996,7 +20996,7 @@ f_virtcol(typval_T *argvars, typval_T *rettv)
2099620996
* "visualmode()" function
2099720997
*/
2099820998
static void
20999-
f_visualmode(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
20999+
f_visualmode(typval_T *argvars, typval_T *rettv)
2100021000
{
2100121001
char_u str[2];
2100221002

src/ex_cmds2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2106,7 +2106,7 @@ set_arglist(char_u *str)
21062106
static int
21072107
do_arglist(
21082108
char_u *str,
2109-
int what UNUSED,
2109+
int what,
21102110
int after UNUSED) /* 0 means before first one */
21112111
{
21122112
garray_T new_ga;

src/ex_docmd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9281,7 +9281,7 @@ ex_bang(exarg_T *eap)
92819281
* ":undo".
92829282
*/
92839283
static void
9284-
ex_undo(exarg_T *eap UNUSED)
9284+
ex_undo(exarg_T *eap)
92859285
{
92869286
if (eap->addr_count == 1) /* :undo 123 */
92879287
undo_time(eap->line2, FALSE, FALSE, TRUE);
@@ -9786,7 +9786,7 @@ ex_mkrc(
97869786
#if ((defined(FEAT_SESSION) || defined(FEAT_EVAL)) && defined(vim_mkdir)) \
97879787
|| defined(PROTO)
97889788
int
9789-
vim_mkdir_emsg(char_u *name, int prot UNUSED)
9789+
vim_mkdir_emsg(char_u *name, int prot)
97909790
{
97919791
if (vim_mkdir(name, prot) != 0)
97929792
{

src/testdir/runtest.vim

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,24 @@ function GetAllocId(name)
7272
return lnum - top - 1
7373
endfunc
7474

75+
function RunTheTest(test)
76+
echo 'Executing ' . a:test
77+
if exists("*SetUp")
78+
call SetUp()
79+
endif
80+
81+
call add(s:messages, 'Executing ' . a:test)
82+
let s:done += 1
83+
try
84+
exe 'call ' . a:test
85+
catch
86+
call add(v:errors, 'Caught exception in ' . a:test . ': ' . v:exception . ' @ ' . v:throwpoint)
87+
endtry
88+
89+
if exists("*TearDown")
90+
call TearDown()
91+
endif
92+
endfunc
7593

7694
" Source the test script. First grab the file name, in case the script
7795
" navigates away. g:testname can be used by the tests.
@@ -92,6 +110,9 @@ else
92110
endtry
93111
endif
94112

113+
" Names of flaky tests.
114+
let s:flaky = ['Test_reltime()']
115+
95116
" Locate Test_ functions and execute them.
96117
set nomore
97118
redir @q
@@ -106,18 +127,13 @@ endif
106127

107128
" Execute the tests in alphabetical order.
108129
for s:test in sort(s:tests)
109-
echo 'Executing ' . s:test
110-
if exists("*SetUp")
111-
call SetUp()
112-
endif
130+
call RunTheTest(s:test)
113131

114-
call add(s:messages, 'Executing ' . s:test)
115-
let s:done += 1
116-
try
117-
exe 'call ' . s:test
118-
catch
119-
call add(v:errors, 'Caught exception in ' . s:test . ': ' . v:exception . ' @ ' . v:throwpoint)
120-
endtry
132+
if len(v:errors) > 0 && index(s:flaky, s:test) >= 0
133+
call add(s:messages, 'Flaky test failed, running it again')
134+
let v:errors = []
135+
call RunTheTest(s:test)
136+
endif
121137

122138
if len(v:errors) > 0
123139
let s:fail += 1
@@ -126,9 +142,6 @@ for s:test in sort(s:tests)
126142
let v:errors = []
127143
endif
128144

129-
if exists("*TearDown")
130-
call TearDown()
131-
endif
132145
endfor
133146

134147
if s:fail == 0

src/ui.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1709,13 +1709,21 @@ push_raw_key(char_u *s, int len)
17091709

17101710
tmpbuf = hangul_string_convert(s, &len);
17111711
if (tmpbuf != NULL)
1712+
{
17121713
s = tmpbuf;
17131714

1714-
while (len--)
1715-
inbuf[inbufcount++] = *s++;
1716-
1717-
if (tmpbuf != NULL)
1715+
for (; len--; s++)
1716+
{
1717+
inbuf[inbufcount++] = *s;
1718+
if (*s == CSI)
1719+
{
1720+
/* Turn CSI into K_CSI. */
1721+
inbuf[inbufcount++] = KS_EXTRA;
1722+
inbuf[inbufcount++] = (int)KE_CSI;
1723+
}
1724+
}
17181725
vim_free(tmpbuf);
1726+
}
17191727
}
17201728
#endif
17211729

src/version.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,12 @@ static char *(features[]) =
758758

759759
static int included_patches[] =
760760
{ /* Add new patch number below this line */
761+
/**/
762+
1477,
763+
/**/
764+
1476,
765+
/**/
766+
1475,
761767
/**/
762768
1474,
763769
/**/

src/window.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3901,8 +3901,8 @@ leave_tabpage(
39013901
enter_tabpage(
39023902
tabpage_T *tp,
39033903
buf_T *old_curbuf UNUSED,
3904-
int trigger_enter_autocmds UNUSED,
3905-
int trigger_leave_autocmds UNUSED)
3904+
int trigger_enter_autocmds,
3905+
int trigger_leave_autocmds)
39063906
{
39073907
int old_off = tp->tp_firstwin->w_winrow;
39083908
win_T *next_prevwin = tp->tp_prevwin;

0 commit comments

Comments
 (0)