diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-02-12 22:15:19 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-02-12 22:15:19 +0100 |
commit | 4f5776c17cd86f904a7e2f92db297c73e28939b7 (patch) | |
tree | 6085e8230e216a7d78b99b39d14bd667a45474cf /src | |
parent | 3fb377fa78131004138b22a87afe33eeb7649b94 (diff) | |
download | vim-git-4f5776c17cd86f904a7e2f92db297c73e28939b7.tar.gz |
patch 8.2.0250: test_clear_search_pat() is unusedv8.2.0250
Problem: test_clear_search_pat() is unused.
Solution: Remove the function. (Yegappan Lakshmanan, closes #5624)
Diffstat (limited to 'src')
-rw-r--r-- | src/evalfunc.c | 1 | ||||
-rw-r--r-- | src/proto/regexp.pro | 1 | ||||
-rw-r--r-- | src/proto/search.pro | 1 | ||||
-rw-r--r-- | src/proto/testing.pro | 1 | ||||
-rw-r--r-- | src/regexp.c | 9 | ||||
-rw-r--r-- | src/search.c | 6 | ||||
-rw-r--r-- | src/testdir/test_writefile.vim | 4 | ||||
-rw-r--r-- | src/testing.c | 13 | ||||
-rw-r--r-- | src/version.c | 2 |
9 files changed, 6 insertions, 32 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c index 66be42c24..58f1218f2 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -811,7 +811,6 @@ static funcentry_T global_functions[] = #endif {"test_alloc_fail", 3, 3, FEARG_1, &t_void, f_test_alloc_fail}, {"test_autochdir", 0, 0, 0, &t_void, f_test_autochdir}, - {"test_clear_search_pat", 0, 0, 0, &t_void, f_test_clear_search_pat}, {"test_feedinput", 1, 1, FEARG_1, &t_void, f_test_feedinput}, {"test_garbagecollect_now", 0, 0, 0, &t_void, f_test_garbagecollect_now}, {"test_garbagecollect_soon", 0, 0, 0, &t_void, f_test_garbagecollect_soon}, diff --git a/src/proto/regexp.pro b/src/proto/regexp.pro index 5e8e1a58a..01f1fff0d 100644 --- a/src/proto/regexp.pro +++ b/src/proto/regexp.pro @@ -12,7 +12,6 @@ int vim_regcomp_had_eol(void); regprog_T *vim_regcomp(char_u *expr_arg, int re_flags); void vim_regfree(regprog_T *prog); void free_regexp_stuff(void); -void free_regexp_prev_sub(void); int regprog_in_use(regprog_T *prog); int vim_regexec_prog(regprog_T **prog, int ignore_case, char_u *line, colnr_T col); int vim_regexec(regmatch_T *rmp, char_u *line, colnr_T col); diff --git a/src/proto/search.pro b/src/proto/search.pro index 3b46c0662..e6ac11b2c 100644 --- a/src/proto/search.pro +++ b/src/proto/search.pro @@ -9,7 +9,6 @@ void free_search_patterns(void); void save_last_search_pattern(void); void restore_last_search_pattern(void); char_u *last_search_pattern(void); -void free_last_pat(int idx); int ignorecase(char_u *pat); int ignorecase_opt(char_u *pat, int ic_in, int scs); int pat_has_uppercase(char_u *pat); diff --git a/src/proto/testing.pro b/src/proto/testing.pro index 209abf348..2b001a543 100644 --- a/src/proto/testing.pro +++ b/src/proto/testing.pro @@ -13,7 +13,6 @@ void f_assert_report(typval_T *argvars, typval_T *rettv); void f_assert_true(typval_T *argvars, typval_T *rettv); void f_test_alloc_fail(typval_T *argvars, typval_T *rettv); void f_test_autochdir(typval_T *argvars, typval_T *rettv); -void f_test_clear_search_pat(typval_T *argvars, typval_T *rettv); void f_test_feedinput(typval_T *argvars, typval_T *rettv); void f_test_getvalue(typval_T *argvars, typval_T *rettv); void f_test_option_not_set(typval_T *argvars, typval_T *rettv); diff --git a/src/regexp.c b/src/regexp.c index 7aeddb83c..ef3896c0a 100644 --- a/src/regexp.c +++ b/src/regexp.c @@ -2663,15 +2663,6 @@ free_regexp_stuff(void) } #endif -/* - * Free the previously used substitute search pattern. - */ - void -free_regexp_prev_sub(void) -{ - VIM_CLEAR(reg_prev_sub); -} - #ifdef FEAT_EVAL static void report_re_switch(char_u *pat) diff --git a/src/search.c b/src/search.c index 08915578f..3b310dc2a 100644 --- a/src/search.c +++ b/src/search.c @@ -380,12 +380,6 @@ last_search_pattern(void) } #endif - void -free_last_pat(int idx) -{ - VIM_CLEAR(spats[idx].pat); -} - /* * Return TRUE when case should be ignored for search pattern "pat". * Uses the 'ignorecase' and 'smartcase' options. diff --git a/src/testdir/test_writefile.vim b/src/testdir/test_writefile.vim index 98a06eb01..f616980f3 100644 --- a/src/testdir/test_writefile.vim +++ b/src/testdir/test_writefile.vim @@ -214,6 +214,10 @@ func Test_write_errors() call assert_fails('1,2write', 'E140:') close! + call assert_fails('w > Xtest', 'E494:') + + call assert_fails('w > Xtest', 'E494:') + " Try to overwrite a directory if has('unix') call mkdir('Xdir1') diff --git a/src/testing.c b/src/testing.c index c2b382b8b..5dacf073b 100644 --- a/src/testing.c +++ b/src/testing.c @@ -632,19 +632,6 @@ f_test_autochdir(typval_T *argvars UNUSED, typval_T *rettv UNUSED) } /* - * "test_clear_search_pat()" - * Free the last search and substitute patterns - */ - void -f_test_clear_search_pat(typval_T *argvars UNUSED, typval_T *rettv UNUSED) -{ - free_last_pat(RE_SUBST); - free_last_pat(RE_SEARCH); - set_old_sub(NULL); - free_regexp_prev_sub(); -} - -/* * "test_feedinput()" */ void diff --git a/src/version.c b/src/version.c index 7c31c195d..a28fc0385 100644 --- a/src/version.c +++ b/src/version.c @@ -743,6 +743,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 250, +/**/ 249, /**/ 248, |