diff --git a/src/diff.c b/src/diff.c index be7e38ccbe..92e1a054e7 100644 --- a/src/diff.c +++ b/src/diff.c @@ -641,7 +641,7 @@ diff_write(buf_T *buf, char_u *fname) */ void ex_diffupdate( - exarg_T *eap UNUSED) /* can be NULL */ + exarg_T *eap) /* can be NULL */ { buf_T *buf; int idx_orig; diff --git a/src/eval.c b/src/eval.c index 9fd39d804b..9f9172c964 100644 --- a/src/eval.c +++ b/src/eval.c @@ -9217,7 +9217,7 @@ f_argidx(typval_T *argvars UNUSED, typval_T *rettv) * "arglistid()" function */ static void -f_arglistid(typval_T *argvars UNUSED, typval_T *rettv) +f_arglistid(typval_T *argvars, typval_T *rettv) { win_T *wp; @@ -17809,7 +17809,7 @@ f_round(typval_T *argvars, typval_T *rettv) * "screenattr()" function */ static void -f_screenattr(typval_T *argvars UNUSED, typval_T *rettv) +f_screenattr(typval_T *argvars, typval_T *rettv) { int row; int col; @@ -17829,7 +17829,7 @@ f_screenattr(typval_T *argvars UNUSED, typval_T *rettv) * "screenchar()" function */ static void -f_screenchar(typval_T *argvars UNUSED, typval_T *rettv) +f_screenchar(typval_T *argvars, typval_T *rettv) { int row; int col; @@ -20996,7 +20996,7 @@ f_virtcol(typval_T *argvars, typval_T *rettv) * "visualmode()" function */ static void -f_visualmode(typval_T *argvars UNUSED, typval_T *rettv UNUSED) +f_visualmode(typval_T *argvars, typval_T *rettv) { char_u str[2]; diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 36e74ea383..6705695349 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -2106,7 +2106,7 @@ set_arglist(char_u *str) static int do_arglist( char_u *str, - int what UNUSED, + int what, int after UNUSED) /* 0 means before first one */ { garray_T new_ga; diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 28f368c25d..8b94851b7c 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -9281,7 +9281,7 @@ ex_bang(exarg_T *eap) * ":undo". */ static void -ex_undo(exarg_T *eap UNUSED) +ex_undo(exarg_T *eap) { if (eap->addr_count == 1) /* :undo 123 */ undo_time(eap->line2, FALSE, FALSE, TRUE); @@ -9786,7 +9786,7 @@ theend: #if ((defined(FEAT_SESSION) || defined(FEAT_EVAL)) && defined(vim_mkdir)) \ || defined(PROTO) int -vim_mkdir_emsg(char_u *name, int prot UNUSED) +vim_mkdir_emsg(char_u *name, int prot) { if (vim_mkdir(name, prot) != 0) { diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim index 469a4d3855..0cf50006db 100644 --- a/src/testdir/runtest.vim +++ b/src/testdir/runtest.vim @@ -72,6 +72,24 @@ function GetAllocId(name) return lnum - top - 1 endfunc +function RunTheTest(test) + echo 'Executing ' . a:test + if exists("*SetUp") + call SetUp() + endif + + call add(s:messages, 'Executing ' . a:test) + let s:done += 1 + try + exe 'call ' . a:test + catch + call add(v:errors, 'Caught exception in ' . a:test . ': ' . v:exception . ' @ ' . v:throwpoint) + endtry + + if exists("*TearDown") + call TearDown() + endif +endfunc " Source the test script. First grab the file name, in case the script " navigates away. g:testname can be used by the tests. @@ -92,6 +110,9 @@ else endtry endif +" Names of flaky tests. +let s:flaky = ['Test_reltime()'] + " Locate Test_ functions and execute them. set nomore redir @q @@ -106,18 +127,13 @@ endif " Execute the tests in alphabetical order. for s:test in sort(s:tests) - echo 'Executing ' . s:test - if exists("*SetUp") - call SetUp() - endif + call RunTheTest(s:test) - call add(s:messages, 'Executing ' . s:test) - let s:done += 1 - try - exe 'call ' . s:test - catch - call add(v:errors, 'Caught exception in ' . s:test . ': ' . v:exception . ' @ ' . v:throwpoint) - endtry + if len(v:errors) > 0 && index(s:flaky, s:test) >= 0 + call add(s:messages, 'Flaky test failed, running it again') + let v:errors = [] + call RunTheTest(s:test) + endif if len(v:errors) > 0 let s:fail += 1 @@ -126,9 +142,6 @@ for s:test in sort(s:tests) let v:errors = [] endif - if exists("*TearDown") - call TearDown() - endif endfor if s:fail == 0 diff --git a/src/ui.c b/src/ui.c index 7844bc6cc2..989c15a2e8 100644 --- a/src/ui.c +++ b/src/ui.c @@ -1709,13 +1709,21 @@ push_raw_key(char_u *s, int len) tmpbuf = hangul_string_convert(s, &len); if (tmpbuf != NULL) + { s = tmpbuf; - while (len--) - inbuf[inbufcount++] = *s++; - - if (tmpbuf != NULL) + for (; len--; s++) + { + inbuf[inbufcount++] = *s; + if (*s == CSI) + { + /* Turn CSI into K_CSI. */ + inbuf[inbufcount++] = KS_EXTRA; + inbuf[inbufcount++] = (int)KE_CSI; + } + } vim_free(tmpbuf); + } } #endif diff --git a/src/version.c b/src/version.c index d5c1b28e9e..d7ed35dd7c 100644 --- a/src/version.c +++ b/src/version.c @@ -758,6 +758,12 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1477, +/**/ + 1476, +/**/ + 1475, /**/ 1474, /**/ diff --git a/src/window.c b/src/window.c index f8816913b4..3b2846142d 100644 --- a/src/window.c +++ b/src/window.c @@ -3901,8 +3901,8 @@ leave_tabpage( enter_tabpage( tabpage_T *tp, buf_T *old_curbuf UNUSED, - int trigger_enter_autocmds UNUSED, - int trigger_leave_autocmds UNUSED) + int trigger_enter_autocmds, + int trigger_leave_autocmds) { int old_off = tp->tp_firstwin->w_winrow; win_T *next_prevwin = tp->tp_prevwin;